File name so long the file cannot be deleted

Posted on 2010-01-12
Medium Priority
Last Modified: 2012-05-08
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.
Question by:telstar_
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 26295602
try this link


worked for me before

good luck

Accepted Solution

Vaidas911 earned 2000 total points
ID: 26295636
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:

Author Closing Comment

ID: 31676244
Fantastic assist! Thanks! Fixed the problem! Stupid file is history!

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question