System.IO.File.Open Odd Behavior?

  • Thread starter Thread starter Dachshund Digital
  • Start date Start date
D

Dachshund Digital

If Explorer can display a file path longer than 260 odd characters,
why is it that System.IO.File.Open Method can not? Calling GetFiles
from my.computer.fileystem can return paths longer but File.Open can
not open them?

For example the following path causes File.Open to freak.

Could not find a part of the path 'E:\_Old Development\Volume I
\_Visual Studio Projects (Old)\_Very Old Development\_Development
Example(s)\How to improve backup, restore and duplication performance
when using a Windows 2000 or NT 4_0 media'.

Even calling GetShortPathName on a given path, then calling File.Open
to open stream, it freaks out?
 
If Explorer can display a file path longer than 260 odd characters,
why is it thatSystem.IO.File.OpenMethod can not? Calling GetFiles
from my.computer.fileystem can return paths longer but File.Open can
not open them?

For example the following path causes File.Open to freak.

Could not find a part of the path 'E:\_Old Development\Volume I
\_Visual Studio Projects (Old)\_Very Old Development\_Development
Example(s)\How to improve backup, restore and duplication performance
when using a Windows 2000 or NT 4_0 media'.

Even calling GetShortPathName on a given path, then calling File.Open
to open stream, it freaks out?

I type corrected, it is not only File.Open that has issues with the
path above... Even My.Computer.FileSystem.DirectoryExists freaks out
as well! And calling GetShortPathName returns NOTHING or zero length
as well, so how the heck do you work with these paths in .NET that
Explorer handles with no issues?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top