Sign in with
Sign up | Sign in
Your question
Closed

Source or Destination Path too Long

Last response: in Windows 7
Share
February 13, 2010 11:23:10 PM

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!!!!
February 14, 2010 12:23:27 AM

Quote:
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.
Score
0

Best solution

February 14, 2010 1:10:02 AM

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.
Share
Related resources
a c 209 $ Windows 7
February 14, 2010 3:58:18 AM

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.
Score
0
February 14, 2010 3:18:21 PM

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.
Score
0
February 14, 2010 3:22:32 PM

Right away when I try renaming, I get a message saying:

Folder in use: The file/folder cannot be deleted/renamed because it is in use by another program.
Score
0
February 14, 2010 6:46:38 PM

sminlal said:
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.



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.
Score
0
a b $ Windows 7
February 14, 2010 7:35:05 PM

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.
Score
0
a c 209 $ Windows 7
February 14, 2010 8:09:34 PM

I think ijack's probably got it right - if all of the directories have the same name then you've probably got an NTFS junction point that refers to itself. See: http://support.microsoft.com/kb/205524
Score
0
February 14, 2010 8:33:22 PM

Ijack said:
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.


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.
Score
0
February 14, 2010 8:34:24 PM

By the way, the DelinvFile program has been running for 2 hours now and is up to 500000+ sub folders/files deleted. I'd say it's not working.
Score
0
February 14, 2010 9:14:27 PM

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.
Score
0
February 14, 2010 9:14:45 PM

Best answer selected by Sittler27.
Score
0
February 15, 2010 7:32:20 AM

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
Score
0
February 15, 2010 4:23:58 PM

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.
Score
0
Anonymous
a b $ Windows 7
November 17, 2010 8:22:50 PM

Hi,

I faced some similar kind of problem and solved it. http://www.deletelongfile.com this link is very helpful in this matter.
Score
0
a c 215 $ Windows 7
November 17, 2010 9:52:40 PM

This topic has been closed by The_Prophecy
Score
0
!