473,394 Members | 1,739 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,394 software developers and data experts.

Path too long exception

How to deal with this exception?
I need to quickly make my appl to be able to open files beyong this limit
Any help appreciated.

Peter
Mar 14 '08 #1
4 1929
"Peter" <wo**********@gmail.comwrote in message
news:fr**********@news.uar.net...
How to deal with this exception?
I need to quickly make my appl to be able to open files beyong this limit
Any help appreciated.
I believe this is a limitation of Windows, not of .NET.
--
--------------------------------------------------------------------------------
John Saunders | MVP – Windows Server System – Connected System Developer
Mar 14 '08 #2
Dans : news:uQ**************@TK2MSFTNGP04.phx.gbl,
John Saunders [MVP] disait :
"Peter" <wo**********@gmail.comwrote in message
news:fr**********@news.uar.net...
>How to deal with this exception?
I need to quickly make my appl to be able to open files beyong this
limit Any help appreciated.

I believe this is a limitation of Windows, not of .NET.
I think some Windows API can handle path longer than 260 chars in their
Unicode version.
But the framework defines the max to 260.
So, the solution could be to use API perhaps.

--
Fred
fo*****@free.fr

Mar 14 '08 #3
Thanks

I already found out myself.
It is limitation of ansi WinAPI.
Found quick solution here:

http://www.abtollc.com/products.aspx

there are c++ and .NET wrapper.

Thanks

Fred wrote:
Dans : news:uQ**************@TK2MSFTNGP04.phx.gbl,
John Saunders [MVP] disait :
>"Peter" <wo**********@gmail.comwrote in message
news:fr**********@news.uar.net...
>>How to deal with this exception?
I need to quickly make my appl to be able to open files beyong this
limit Any help appreciated.

I believe this is a limitation of Windows, not of .NET.

I think some Windows API can handle path longer than 260 chars in their
Unicode version.
But the framework defines the max to 260.
So, the solution could be to use API perhaps.
Mar 14 '08 #4
Hello Peter,

use unicode version if winapi.
Just user the "\\?\" prefix for this http://msdn2.microsoft.com/en-us/library/aa365247.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
PThanks
P>
PI already found out myself.
PIt is limitation of ansi WinAPI.
PFound quick solution here:
Phttp://www.abtollc.com/products.aspx
P>
Pthere are c++ and .NET wrapper.
P>
PThanks
P>
PFred wrote:
P>
>Dans : news:uQ**************@TK2MSFTNGP04.phx.gbl, John Saunders
[MVP] disait :
>>"Peter" <wo**********@gmail.comwrote in message
news:fr**********@news.uar.net...
How to deal with this exception?
I need to quickly make my appl to be able to open files beyong this
limit Any help appreciated.
I believe this is a limitation of Windows, not of .NET.
I think some Windows API can handle path longer than 260 chars in
their
Unicode version.
But the framework defines the max to 260.
So, the solution could be to use API perhaps.

Mar 16 '08 #5

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

Similar topics

1
by: Matthias Ludwig | last post by:
I'm trying to create a directory on the web server with a vb.net code: .... Dim dirName As String = "w:\filepath\images" If Not Directory.Exists(dirName) Then...
8
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
70
by: Michael Hoffman | last post by:
Many of you are familiar with Jason Orendorff's path module <http://www.jorendorff.com/articles/python/path/>, which is frequently recommended here on c.l.p. I submitted an RFE to add it to the...
0
by: PG | last post by:
I am reading a directory using FileInfo Class. Have an exception "PathTooLongException" error and would like to catch the name of the file and its path that is throwing the exception. Thanks a lot...
34
by: Reinhold Birkenfeld | last post by:
Hi, the arguments in the previous thread were convincing enough, so I made the Path class inherit from str/unicode again. It still can be found in CVS:...
1
by: Jeff Connelly | last post by:
I'm using IsolatedStorageFile.GetUserStoreForDomain(), and then using this object to create IsolatedStorageFileStream. The problem is the path generated is too long (it throws an exception). It...
4
by: Matt Sawyer | last post by:
I am attempting to use an API (CxApiOem.dll) that has a large number of defines and complicated structs. It's just too much hassle to attempt to use DLLImport to make the desired API calls. ...
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...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.