Is it possible to get a full path with double backslash by using Path.GetFullPath
? Something like this:
C:\\\\Users\\\\Mammamia\\\\Videos\\\\Doc
C:\\Users\\Mammamia\\Videos\\Documents\\CFD\\geo_msh\\cubeOp.txt
is not a valid path, so I'm not sure why you'd want it, but:
Path.GetFullPath(yourPath).Replace("\\", "\\\\");
You can just do this:
Path.GetFullPath(@"C:\\Users\\Mammamia\\Videos\\Documents\\CFD\\geo_msh\\cubeOp.txt")
But i'm not sure why, you want to escape the \ ?
If yes, you can do just this :
Path.GetFullPath(@"C:\Users\Mammamia\Videos\Documents\CFD\geo_msh\cubeOp.txt")
I would recommend doing a String.replace(). I recently had to do this in a project for myself. So if you do something similar to:
String input = Path.GetFullPath(x);
input = input.Replace("\\","\\\\");
I am fairly confident that is what you need :)
Documentation: http://msdn.microsoft.com/en-us/library/fk49wtc1.aspx
Do you mean this?
Path.GetFullPath(path).Replace(@"\", @"\\");