Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was trying to delete a text file so i use the remove();if i give only file name it works but if i use absolute path of the file the remove function fails what to do in case of absolute path.....
Posted
Comments
Jibesh 28-Dec-12 7:25am    
what error you are getting? any exception?
Please post the failure details so that we can able to give a better solution

DeleteFile works with absolute paths.

Maybe you should post the code you used if you used remove() to take a look at it.
 
Share this answer
 
v2
The remove function should work equally well with an absolute path. Perhaps your path specification is not correct. Remeber that you have to specify backslashes as double-backslashes in a strings!

If in doubt show us the code you are using, so we can have a look at it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900