471,582 Members | 1,354 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to create a long path in VB.NET

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/de...ing_a_file.asp

http://support.microsoft.com/Default...22120121120120

Thanks,

Zenu
Jan 11 '06 #1
3 3053
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

"Zenu" <Ze**@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
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/de...ing_a_file.asp

http://support.microsoft.com/Default...22120121120120

Thanks,

Zenu

Jan 12 '06 #2
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)\dddd d...(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

"clintonG" wrote:
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

"Zenu" <Ze**@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
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/de...ing_a_file.asp

http://support.microsoft.com/Default...22120121120120

Thanks,

Zenu


Jan 12 '06 #3
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.mm m.ooo.xml

<%= Clinton Gallagher

"Zenu" <Ze**@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
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)\dddd d...(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

"clintonG" wrote:
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

"Zenu" <Ze**@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
> 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/de...ing_a_file.asp
>
> http://support.microsoft.com/Default...22120121120120
>
> Thanks,
>
> Zenu
>
>


Jan 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by I am Sam | last post: by
5 posts views Thread by Michael Sperlle | last post: by
5 posts views Thread by =?Utf-8?B?SmVmZiBCZWVt?= | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by

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.