Results 1 to 6 of 6

Thread: windows xp long file name problem

  1. #1
    Join Date
    Jun 2009
    Posts
    8

    windows xp long file name problem

    As the title suggests, I have a problem with long file name or long location on my Windows XP computer. For example, I have PDF file whose name is actually with more than 100 characters and located at the following location:

    C:\Documents and Settings\All Users.WINDOWS\Documents\Backup xx.xx.xx\DOCUMENT CONTROL\Document xxxxxxxxx x xxxxxxxxx\UKxxxxx xxxxxx xxxxxxx\Client Documents Returns\

    Now the problem is am not able to rename this file because the path and file name exceeds the normal length given by the system. Here I need help from you all for reducing the name of the file.

  2. #2
    Join Date
    Jun 2004
    Posts
    63

    Re: windows xp long file name problem

    In such cases you can reduce the file using SUBST command in Command Prompt. For example, you will need to type the following in command prompt:

    subst x: "C:\Documents and Settings\All Users.WINDOWS\Documents\Backupxx.xx.xx\DOCUMENT CONTROL\Documentxxxxxxxxx x xxxxxxxxx\UKxxxxx xxxxxxxxxxxxx\Client Documents Returns\"

    Now you can access the files in Drive x (according to above code).Once you are done, you should delete the substituted drive.

  3. #3
    Join Date
    Jun 2009
    Posts
    8

    Re: windows xp long file name problem

    Well, I managed to do it in another way. I moved the last sub folder to my main C drive (C:). Due to this, as the location path is shortened, I am now able to open manipulate the files with such long names.

  4. #4
    Join Date
    Jun 2006
    Posts
    69

    Re: windows xp long file name problem

    As far as I know the character limit of a longest path in Windows Xp is 256 but that doesnít mean that you can't have a path that is longer. It just restricts your activities. But you can reduce the path or name characters. I donít think there is anything to worry unless and until you face some issues with the file.

  5. #5
    Join Date
    Feb 2011
    Posts
    2

    Re: windows xp long file name problem

    On a 2003 server I had a long folder name that would not delete. It had no short name. I could not rename it. Tried several other things.
    Solution: Did a series of subst and renames on each folder leading back to the parent folder. (It still would not let me rename or delete the problem long name folder.) However, when I used Windows Explorer to delete the parent it worked. It took the whole path out right down to and including the problem folder.
    If you need to save data residing in any of the other folders in the path, just create a new parent folder with subfolders (short names if possible), then copy the data there prior to deleting the problem long name folder and its parent path.
    You will find that once you have completed the first subst on the entire path leading to the problem folder, you can successfully CD into the problem folder and access any files or folders you need.
    I opened a command prompt, then entered substr Q: "W208public\network support\webfiles\training guide\workingaids\ussid205", then entered a Q: at the prompt, then did a DIR command to see the contents, then a CD into the problem folder to copy what I needed. Afterwards I did a CD .. then a new subst R: on the path to the folder preceding the current one. Then renamed its children. Kept repeating the process (subst and rename) all the way to the parent. Then I successfully deleted the parent, taking out all of its children. including the stubborn long name folder.

  6. #6
    Join Date
    Feb 2011
    Posts
    2

    Re: windows xp long file name problem

    Here's the solution that finally worked for me:
    1. use SUBST to assign a drive letter to the path leading to the long name
    2. enter that drive letter at a cmd prompt
    3. rename the long-named file to a short name like zzz.txt

Similar Threads

  1. Replies: 7
    Last Post: 28-03-2012, 06:32 PM
  2. Replies: 3
    Last Post: 22-01-2011, 07:05 PM
  3. Bootup problem in Windows and application takes very long
    By KABIRA16 in forum Operating Systems
    Replies: 3
    Last Post: 07-10-2009, 05:45 PM
  4. Windows XP Pro SP3 & Long File Names
    By NIcaBoy in forum Windows XP Support
    Replies: 5
    Last Post: 05-09-2008, 08:45 PM
  5. The file name you specified is not valid or too long.
    By kdi in forum Operating Systems
    Replies: 3
    Last Post: 11-05-2008, 12:10 PM

Posting Permissions

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