473,225 Members | 1,373 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,225 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 3148
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave | last post by:
I have an application where I am providing the user the ability to select or create a folder on a domain, using SHBrowseForFolder. When the user selects/creates a folder on a remote computer, it...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
6
by: I am Sam | last post by:
I keep getting this error and I don't know why: The path is too long after being fully qualified. Make sure path is less than 260 characters. Description: An unhandled exception occurred...
2
by: Seth | last post by:
Ok, here is my setup. I have a fully functioning HTTP Handler implemented. The handler is supposed to handle every single request that comes in to a particular virtual directory. Thus, in IIS, I...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
5
by: =?Utf-8?B?SmVmZiBCZWVt?= | last post by:
Before you respond with "just use GetShortPathName" please read the rest. We have an application that places files on a file server using mapped drives as it's path of choice. The reason for...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.