leela74,
Cannot understand the need of using system command if the same you can do without doing a change of directory.
concatenate your file name abc.txt to full directory path and use fopen,it will try to open the file in that directory only,secondly I think you do not require to replace \...