none
Is File Path longer than 260 characters allowed in .Net 2.0 ? RRS feed

Answers

All replies

  • Hello,

    Ever got this error?
    The specified path, file name, or both are too long. The fully qualified
    file name must be less than 260 characters, and the directory name must be
    less than 248 characters.

    Since the .NET Framework does not support long filenames :-(
    I had to write a library that calls the WIN32 API and wraps those functions
    like System.IO.

    I have a solution to your problem!
    Delimon.Win32.IO replaces basic file functions of System.IO with long path
    names support for characters up to 32,767 Characters
    So bye bye MAX_PATH problem

    A new version is available now:
    - Added file/folder date changes
    - Added attributes support
    - Added Reading and Writing files

    A Win32Explorer is also available that lets you access long filenames in
    Windows

    You can download my library here:
    http://www.delimon.be
    Monday, October 2, 2006 11:56 AM
  • Hey, I downloaded the DLL, nice work.
    I ran into a bug

    Directory.Exists(string);

    if the string ends in a '\' it will return false.. like so



    Directory.Exists("c:\mydir\") < will return false
    Directory.Exists("c:\mydir") < will return true

    It's not exactly how the System.IO works.

    Thanks!
    Monday, October 20, 2008 5:45 PM
  • I also ran into the same issue. Thanks James for posting your findings.  By the way, i can't seem to access this

    http://www.delimon.be/
    
     site anymore, anyone has any idea what happened to this?

    If you run into this problem and see that the Delimon library or similar since does not work, watch out for the condition where the individual subPath (those part of the path between the '\' character) that they must be less than 256 (lpMaximumComponentLength) characters long according to this: http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx

    Tuesday, February 8, 2011 12:07 AM
  • Hi i've got the same problem

    can anyone help me? where can i dowload the library?

    http://www.delimon.be  

    doesn't work...

    Saturday, February 26, 2011 10:53 AM
  • Hi guys,

    Sorry that it took so long but I have the Library avaiable again in this location
    http://gallery.technet.microsoft.com/DelimonWin32IO-Library-17cc7893

    Not that i decided to stop sharing it but some years ago I lost everything, severe multiple disk crashes and unreadable CD/DVDs
    Fortunately I found it again and decided to upload it to the Technet site.

    This is a .NET Library wirtten against .NET Framework 2.0 and can be used to
    access very long folder and files from a .NET application.
    http://gallery.technet.microsoft.com/DelimonWin32IO-Library-17cc7893


    Since the .NET Framework does not support long filenames :-(
    I had to write a library that calls the WIN32 API and wraps those
    functions like System.IO.  While it is not a complete replica of the
    System.IO it does have most objects and functions available.

    Delimon.Win32.IO replaces basic file functions of System.IO
    with long path names support for characters up to 32,767 Characters
    So bye bye MAX_PATH problem

    Did you ever run into this problem?
    System.IO.PathTooLongException

    was unhandled.  Message="The specified path, file name, or both are too
    long. The fully qualified file name must be less than 260 characters, and the
    directory name must be less than 248 characters."

    Grts,
    Johan


    - Belgian Unified Communications Community : http://www.pro-lync.be -


    Wednesday, March 7, 2012 10:47 PM
  • A new Library has been published to the Technet Gallery
    http://gallery.technet.microsoft.com/DelimonWin32IO-Library-V40-7ff6b16c

    Updates:

    • This Library is compiled against the .NET Framework 4.0
    • Fixed the minor bug about Directory.Exists() and the backslash at the end of the path name

    Grts,
    Johan


    - Belgian Unified Communications Community : http://www.pro-lync.be -

    Wednesday, April 4, 2012 11:37 PM