Source or Destination Path too Long

Status
Not open for further replies.

Sittler27

Distinguished
Oct 30, 2009
25
0
18,530
I cannot seem to delete a folder structure that suddenly appeared on my HDD that is about 30 folders all with the same name all within each other. All empty (in fact the entire array of folders shows zero bytes in properties), but yet there are some folders in the bottom few folders.

I cannot delete it as it gives an error of path too long. I cannot rename it or move it as when I right-click it doesn't give me the normal options you see on a right-click.

I've discovered a utility called "Path Too Long Utility" found here:
http://www.pathtoolong.com/Order.aspx

It wants money to repair it, but that's just silly to have to pay for something that just shouldn't happen.

Isn't there an easier way? Some registry hack or something!!!!
 
Solution
You can also try DelinvFile to delete the folder, and all of its sub folders.

It works on invalid files and folders, i.e. File paths or file names too long, that explorer can't handle.

It has been made trialware and has had some functions removed (to what degree I'm not sure). It says it is functional enough to test if it works, so it is worth a shot.

http://www.purgeie.com/delinv/index.htm

Best option to try is "Delete File or Folder at Boot", and it will delete the folder before the operating system fully loads.

ujaansona

Distinguished
Nov 28, 2009
378
1
18,860
when I right-click it doesn't give me the normal options you see on a right-click.
Well what it's giving then?
Any idea how it appeared? Have you detected Any virus, trozan, worm, malware? Do this:
1)Download Microsoft Security Essentials & Update it OR Download AVIRA Antivirus & Run a full scan of computer. It seems to me, your computer may be infected. (Skip this step if you already have a good updated working antivirus).
2)LEFT CLICK on outermost folder, Press F2 from keyboard that will let you RENAME.
3)RENAME it to 1 & press ENTER.
4)Do this for all folders inside each other, i.e. RENAME all of them to 1. If there are multiple folders visible inside one, RENAME them to 1, 2, 3, etc. respectively.
5)After renaming of all folders is complete, go to outermost folder & DELETE it.
 

btk1w1

Distinguished
Oct 13, 2008
744
0
19,060
You can also try DelinvFile to delete the folder, and all of its sub folders.

It works on invalid files and folders, i.e. File paths or file names too long, that explorer can't handle.

It has been made trialware and has had some functions removed (to what degree I'm not sure). It says it is functional enough to test if it works, so it is worth a shot.

http://www.purgeie.com/delinv/index.htm

Best option to try is "Delete File or Folder at Boot", and it will delete the folder before the operating system fully loads.
 
Solution
Delete folder at boot won't work because the pathname restriction is part of the base file system, so it will fail at load time as well.

The easiest way to deal with this is probably to start at the top folder and change it's name to a single-character. If Explorer won't let you do this the do it from a command prompt window. Work your way down through each level, renaming each folder to a single-character name until the total pathname is short enough to be deleted. In fact you may be able to delete the whole tree just by opening a command prompt window and deleting the topmost folder.
 

Sittler27

Distinguished
Oct 30, 2009
25
0
18,530
I ran full virus scan with BitDefender 2010. nothing detected.

I'm going to try the renaming to 1 now as suggested.

Then I'll try the other programs suggested.

Thanks for the help on this and I'll get back to you on how it works out.
 

Sittler27

Distinguished
Oct 30, 2009
25
0
18,530



This doesn't work, as there is literally about 130 subfolder levels. Even by renaming them all, the path is still too long.

I tried using the DelinvFile program, and it is at about 200000 files or subfolders it's trying to delete in that file structure. There's no way there's that many files in there.

Something is seriously wrong. I even ran the virus checker again and still nothing after a deep system scan on Bitdefender 2010.
 
Could I suggest, before you go any further, that you do a "chkdsk" on the drive. I've had a problem in the past with phantom folders like this - a wrong link can lead to a recursive set of directories (really it's just the one); chkdsk should detect and correct this.

This may not be the case in this instance, but it's well worth a try.
 

Sittler27

Distinguished
Oct 30, 2009
25
0
18,530


Did the chkdsk before, didn't detect any problems.

All the recursive folders (150 or so) are empty except for the next recursive folder of the same name. However the last 20 or so are filled with files that were part of the original extraction I did that created the whole thing. That is, I was using a program called YAMJ that builds html pages so they can be used on a media box. It buidls these pages after downloading pictures, etc. off the internet. When I went to check the extraction once completed (it completed unsuccessfully due to a java out of memory error), it had created this mess. Then I went and ran it again and it did the same in another folder, and then a third time it created the same 150 or so recursive folders on a completely different drive (so it's not the HDD).

I'm starting to think I complete Windows 7 rebuild is in order to fix it (not that it's a real issue anyways, I mean the whole folder list says it's 0 bytes. really strange.
 

Sittler27

Distinguished
Oct 30, 2009
25
0
18,530
So after running the Delinfile program and then it erroring out while trying to delete the folder, I then went to the folder and tried to delete it again and it deleted!

Thanks for all the help.
 

Tom Griffin

Distinguished
Sep 29, 2009
78
0
18,640
It's a fault inherent within the elder NTFS file structure (XP era); I ran into this issue and had to rip alot of my CD collection not to mention some archaic 78's of Tommy Dorsey. The simple solution is to use explorer from a more modern version of Windows. I used my 2003 server to tunnel into the drive and had to move and removed each one accordingly. It is a painstaking process but it will eventually fix the problem. Restore from Backup would be the preferred approach. From an engineer's perspective use the tilde thingy from shrugs FAT naming conventions; ie C:\Program Files\Microsoft\ yada yada yada would be C:\Progra~1
etc etal blah blah blah
 

grunthos

Distinguished
May 20, 2008
4
0
18,520
Can't you make use of the DOS Subst command to get the pathname length sorter and start deleting files

E.G.

Subst f: d:\level1\level2\level3\level4\level5\level6\... \levelN
Subst g: f:\levelN+1\level\level\level\level\level\level\level

etc...

Then start deleting/renaming from the bottom up.
 
Status
Not open for further replies.