473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

System.IO.File.Open Odd Behavior?

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?

Apr 8 '07 #1
1 2337
On Apr 8, 3:13 pm, "Dachshund Digital" <Schors...@adelphia.netwrote:
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?

Apr 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: przemas_r | last post by:
Hello everybody. I've found python's behaviour I can't understand. Namely the way os.system () works depending if it's being run in Thread's run function or run in 'normal' way. >>> os.system...
13
by: J. Campbell | last post by:
I'm wanting to output a text header file in front of the data portion of an output file. However when I use "\n" or "endl" as end of line, it just puts a 0x0a in the file(which is...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
2
by: Mattbooty | last post by:
Hello, Not sure if anyone else has seen this bug, but I have a form where the entire form is covered with a picturebox. The picturebox has a mouseup event. I also have an open file dialog for...
1
by: tassieboy | last post by:
Hi All I have a VB.NET application which runs on all client machines except one, where on startup, it gives the message system.enterpriseservices.thunk.dll, or one of its dependencies, were not...
17
by: Peter Duniho | last post by:
I searched using Google, on the web and in the newsgroups, and found nothing on this topic. Hopefully that means I just don't understand what I'm supposed to be doing here. :) The problem: ...
14
by: prasadjoshi124 | last post by:
Hi All, I am writing a small tool which is supposed to fill the filesystem to a specified percent. For, that I need to read how much the file system is full in percent, like the output given...
7
by: Michael Castleton | last post by:
When I open a csv or txt file with: infile = open(sys.argv,'rb').readlines() or infile = open(sys.argv,'rb').read() and then look at the first few lines of the file there is a carriage return...
8
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service and hosted it in Windows Services. It is working fine. Now I am trying to implement the X509 certificates for message layer security. But it is throwing the following...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.