tags:

views:

812

answers:

3

The message box crops up could not find part of the path of the file"file path" when i try to open a file that has space in its file path. I have used LocalPath instead of AbsolutePath and it works fine for me, but its only limited to WinApps, i needed a more generic solution. Some thing like Uri unescaped data path. I am not sure about the syntax.

+2  A: 

If the file can be fetched depends on your implementation of the software. Try to replace the spaces with %20

What kind of development are we talking about here? JAVA GUI or WebApps? C/C++?

Martin K.
Its C#. When the error box comes up then the space gets replaced by %20. Can we make use of Uri Builder here. If yes than how?
A: 

You should try enclosing your URI with quotes

new Uri("\"C:\some path\some file\"");
Muad'Dib
A: 

In Java: URI uri = new File("spaces in file name").toURI();

oa