How to create a long path in VB.NET

G

Guest

Hi,

I have a system with very long paths and I'm trying to use
file.exist(Longpath) to test the paths existance but it gives a message that
the path is too long.

Can someone tell me how to manupulate long path in VB.NET. I am refering to
fully qualified paths over 32000 characters where each component of the path
could be up to 255 characters.

On Microsoft site they claim that paths could be over 32000 characters.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp

http://support.microsoft.com/Default.aspx?kbid=320081#XSLTH4171121122120121120120

Thanks,

Zenu
 
C

clintonG

I'm very curious about this myself. Do you mean we can use unicode somehow
to build a file name much much much longer than 260 characters? The MSDN
document is confusing to me in this regard.

For example, can unicode be used as a format to name a file using the same
type of ASCII characters you are reading right now? In other words I suppose
I want to know if ASCII characters can be represented using unicode which
can then allow me to create a long file name of something like 1,000 ASCII
characters or more.

So how long is your path? Can you copy and paste some of the characters in a
reply so I can see if they are ASCII characters or some characters from a
language other than English?

<%= Clinton Gallagher
 
G

Guest

Hi Clinton,

The Path uses standard characters as far as I can tell. So the fully
qualified path below can be over 32000 characters but each
component(folder/file) can not be longer than 255 characters.

LongPath:
G:\aaaaa..(255
chars)\bbbbb...(255chars)\cccccc...(255chars)\ddddd...(255chars).TXT

What I don't understand is how to make the File and directory classes of
..NET recognize fully qualified paths greater that 260 characters.

Zenu
Zenu
 
C

clintonG

Very interesting Zenu.
I was planning to try to find some developers with Win32 experience to
reply. I've been pondering the usefullness of XML files with long file names
in the form of aaa.bbb.ccc.ddd.eee.fff.ggg.hhh.iii.jjj.kkk.lll.mmm.ooo.xml

<%= Clinton Gallagher
 

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

Top