Click here to Skip to main content
15,896,730 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a file and path:

C:\Users\User\Documents\Folder\file.ext

I want it to look like this:

C:\\Users\\User\\Documents\\Folder\\file.ext

I want to make it automatic for any file and path.
Posted
Updated 2-May-15 10:11am
v2
Comments
Sergey Alexandrovich Kryukov 2-May-15 16:12pm    
No, you don't want it. You just did not get the trivial idea. You re-post your question where you got correct answers which you ignored.
—SA

Take a look here:
String.Replace(..)[^]
 
Share this answer
 
Use
String.Replace("\","\\");
 
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