473,466 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 3162
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.