+ Reply to Thread
Results 1 to 2 of 2

Thread: PathTooLong exception

  1. #1
    Junior Member
    Join Date
    Apr 2012

    PathTooLong exception

    I am facing a very annoying problem while creating files , is that Path is too long and it can't exceed something like 250 characters and i don't know what should i do to bypass that exception.

    Any idea?
    Last edited by jemmy; 11-02-2012 at 12:41 PM.

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Windows support a full path up to 260 char in length(including file name) or 248 char(excluding file name)

    Personally i faced the same problem , whenever i am trying to access a file which it`s path length is longer than 260 char i get the ugly warning [PathTooLong]
    But i have found a solution for that >> Downloading a Library called : Delimon.Win32.IO.dll

    It has the same functions like System.IO; , so you wont need to import the library System.IO into program anymore because
    It will be conflicted between the original System.IO and Delimon.Win32.IO since they got exactly the same functions.

    Some example for the Delimon.Win32.IO library :
    Delimon.Win32.IO.FileInfo Info = new Delimon.Win32.IO.FileInfo("filename");
    FileInfo Info = new FileInfo(eachfile); // if you already typed using Delimon.Win32.IO;
    And so on......

    Happy Coding and no long path exceptions any more

+ Reply to Thread

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts