views:

38

answers:

1

Hi,

I added a key to the registry such that when I right click on a jpeg file I see a new "Transform" option that actually runs my application. My application gets the full path of the selected file as an agrument (in "args" parameter of "Main()"). The problem is that Windows converts the full path of the file to something that contains "~" characters. For example: "A B C.JPG" becomes "ABC~1.JPG".

Is there any way to restore the original full path of the file (that contains spaces) in my application ? If not, could you suggest a workaround ?

Thanks !

+1  A: 

Try System.IO.Path.GetFullPath. But I don't see why it matters if you're just opening the file.

wj32
You are genius ! Thanks a lot ! Actually I use the full path to retrieve the file name and then to save the transformed image with the same name (but in a different location).