Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Free utility to delete long file names etc 1

Status
Not open for further replies.

hpsait

Technical User
Oct 7, 2010
98
0
0
ZA
I'm busy cleaning up data on a Windows 2003 Server, but I have came across data that I cannot delete. Path is too long or file name is too long. Total Commander can copy these files or folders but I cannot delete them. Any freeware utility you can recommend for 2003 and 2008 servers.
 
One trick here is to use the Subst command to reduce the path length

e.g. say ypou have a path to a file like:

c:\myroot\level1\level2\level3\level4\level5\hereismyfile.txt

Try

subst z: c:\myroot\level1\level2\level3\level4

And then your file can be referred to as:

z:\level5\hereismyfile.txt

which is shorter, as you can see.

 
Long live the DOS commands, especially the short ones!
That'll sure come in handy for me too, some day.
==>*

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Any software program that can do this?
 
Well, you can try prefacing the path with \\?\ to gain direct access to the underlying system calls, many of which (but not all)support a much longer path name than Windows normally allows. So

c:\myroot\level1\level2\level3\level4\level5\hereismyfile.txt

would become

\\?\c:\myroot\level1\level2\level3\level4\level5\hereismyfile.txt

 
The software I've used to get rid of files with long file names is something like CAINE or Slax. These are Linux based. I burn them to CDs, boot from the CD and use Linux to remove long files name.

For servers that I can't take down, I use strongm's suggestion.


James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top