check for a particular character inside a file and substitute with a given character?

i am a newbie to shell script,so i want a kshell script in which i need to check for a particular character inside a file through conditional looping(like if ,case,while)and if that character exists ,then substitute a given character to that character.

consider a file test.txt,inside the file the content will be like c:\home\temp,
my requirement is to check the existence of a character(\) inside a file,and then substitute the character(/) for an existing character(\),i.e.result must be like c:/home/temp.

This is better placed in the subforum for shell scripting than in AIX. Nevertheless:

echo "c:\data\test\accounts.xls"| sed 's!\\!\/!g'
c:/data/test/accounts.xls

sed is a stream editor - you will not need a loop. It works on every line of input, like awk or grep.
If you want to reverse it, just change the slash vs. the backslash which are pointed out in bold up there.