• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

File name so long the file cannot be deleted

I have a file on a server that was autogenerated with a filename that is so long I cannot delete it, it won't let me rename it, etc. etc.

Basically I just need to delete this file. Who knows of a utility that can help me with this problem? It is running on Windows Storage Server 2003.
1 Solution
try this link


worked for me before

good luck
Use this: http://support.microsoft.com/kb/320081/en-us
Files exist in paths that are deeper than MAX_PATH characters
You may not be able to open, edit, or delete a file if there are issues with the file path.
Resolution 1: Use an auto-generated 8.3 name to access the file
To resolve this issue, you may want to use the auto-generated 8.3 name to access the file. This resolution may be the easiest resolution if the path is deep because the folder names are too long. If the 8.3 path is also too long or if 8.3 names have been disabled on the volume, go to Resolution 2. For additional information about disabling 8.3 file names on NTFS volumes, click the following article number to view the article in the Microsoft Knowledge Base:
121007  (http://support.microsoft.com/kb/121007/ ) How to disable the 8.3 name creation on NTFS partitions
Resolution 2: Rename or move a deep folder
Rename the folder so that the target files that are deeper than the MAX_PATH no longer exist. If you do this, start at the root folder (or any other convenient place), and then rename folders so that they have shorter names. If this step does not resolve this issue (for example, if a file is more than 128 folders deep), go to Resolution 4.
Resolution 3: Map a drive to a folder in the structure of the path
Map a drive to a folder inside the structure of the path of the target file or folder. This method shortens the virtual path.

For example, suppose you have a path that is structured as follows:
In this path, the total character count is over 255 characters. To short the length of this path, to 73 characters, map a drive to SubfolderName4.
Resolution 4: Use a network share that is as deep as the folder
If Resolution 1, 2, and 3 are not convenient or do not resolve the issue, create a network share that is as deep in the folder tree as you can, and then rename the folders by accessing the share.
Resolution 5: Use a tool that can traverse deep paths
Many Windows programs expect the maximum path length to be shorter than 255 characters. Therefore, these programs only allocate enough internal storage to handle these typical paths. NTFS does not have this limit and it can hold much longer paths.

You may experience this issue if you create a share at some point in your folder structure that is already fairly deep, and then create a deep structure below that points by using the share. Some tools that operate locally on the folder tree may not be able to traverse the whole tree starting from the root. You may have to use these tools in a special way so that they can traverse the share. (The CreateFile API documentation describes a method to traverse the whole tree in this situation.)

Typically, you can manage files by using the software that creates them. If you have a program that can create files that are deeper than MAX_PATH, you can typically use that same program to delete or manage the files. You can typically delete files that are created on a share by using the same share.

or these:
telstar_Author Commented:
Fantastic assist! Thanks! Fixed the problem! Stupid file is history!

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now