sglee
asked on
Source path too long
Hi,
I have a weird situation. I have a folder "C:\Data\Invoice\Backup" and in it, I have so many sub-folders created by ROBOCOPY.
At first I wanted to simply delete the folder by clicking [Delete] button, but I keep getting this error message about "The source file names are larger than ...".
I googled this error message and found an article where the author suggested that I rename all these sub-folders to 1 letter length and delete the folders afterwards.
I followed that suggestion and that is the reason why you see so many 'a'. It was somewhat effective, but no all of the files are being deleted and it is taking too much time to rename folders.
. When I run a DOS command "DIR /s /w" to list all the sub-folders, I see the following:
>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>
Directory of C:\Data\Invoice\Backup\a\a \a\a\a\a\a \a\a\a\a\a \a\a\a\1\1 \1\1\1\1\1
\1\1\1\1\1\1\1\a\1\a\c\a\a \a\1\a\a\a \a\1\1\1\1 \1\1\1\1\1 \3\1\1\1\1 \1\1\1\1\1 \1\1
\2\1\1\3\1\1\3\1\1\3\2\1\1 \1\1\2\1\1 \1\1\1\1\1 \1\2\1\2\2 \1\1\3\1\1 \3\1\1
[.]
[..]
05102011_Honda_pay_online_ receipt.as p.htm
[05102011_Honda_pay_online _receipt.a sp_files]
[2]
Data2000 - 2018 May 7 with blank username_password table.mdb
Company_PurchaseOrderNo_Fo rYear_2010 _2011.pdf
RealData_NewCreditApplicat ion_634408 1159793656 33.pdf
4 File(s) 24,697,752 bytes
The directory name C:\Data\Invoice\Backup\a\a \a\a\a\a\a \a\a\a\a\a \a\a\a\1\1 \1\1\
1\1\1\1\1\1\1\1\1\1\a\1\a\ c\a\a\a\1\ a\a\a\a\1\ 1\1\1\1\1\ 1\1\1\3\1\ 1\1\1\1\1\ 1\1\
1\1\1\2\1\1\3\1\1\3\1\1\3\ 2\1\1\1\1\ 2\1\1\1\1\ 1\1\1\1\2\ 1\2\2\1\1\ 3\1\1\3\1\ 1\05
102011_Honda_pay_online_re ceipt.asp_ files is too long.
Total Files Listed:
8 File(s) 98,112,273 bytes
295 Dir(s) 20,178,972,672 bytes free
>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>
Is there any other way to remove this folder from the root (C:\Data\Invoice\Backup\a) ?
Thanks.
I have a weird situation. I have a folder "C:\Data\Invoice\Backup" and in it, I have so many sub-folders created by ROBOCOPY.
At first I wanted to simply delete the folder by clicking [Delete] button, but I keep getting this error message about "The source file names are larger than ...".
I googled this error message and found an article where the author suggested that I rename all these sub-folders to 1 letter length and delete the folders afterwards.
I followed that suggestion and that is the reason why you see so many 'a'. It was somewhat effective, but no all of the files are being deleted and it is taking too much time to rename folders.
. When I run a DOS command "DIR /s /w" to list all the sub-folders, I see the following:
>>>>>>>>>>>>>>>>>>>>>>>>>>
Directory of C:\Data\Invoice\Backup\a\a
\1\1\1\1\1\1\1\a\1\a\c\a\a
\2\1\1\3\1\1\3\1\1\3\2\1\1
[.]
[..]
05102011_Honda_pay_online_
[05102011_Honda_pay_online
[2]
Data2000 - 2018 May 7 with blank username_password table.mdb
Company_PurchaseOrderNo_Fo
RealData_NewCreditApplicat
4 File(s) 24,697,752 bytes
The directory name C:\Data\Invoice\Backup\a\a
1\1\1\1\1\1\1\1\1\1\a\1\a\
1\1\1\2\1\1\3\1\1\3\1\1\3\
102011_Honda_pay_online_re
Total Files Listed:
8 File(s) 98,112,273 bytes
295 Dir(s) 20,178,972,672 bytes free
>>>>>>>>>>>>>>>>>>>>>>>>>>
Is there any other way to remove this folder from the root (C:\Data\Invoice\Backup\a)
Thanks.
I've encountered this problem before. 7-zip's file manager seems to be able to work around the issue. You can delete the files from within there.
I guess I would move all the files to a sane location, then use DELTREE to delete all those subfolders.
or drop to command prompt, and remove manually....
seen this at many Schools..... students do it for a laugh, because explorer cannot handle long paths!
seen this at many Schools..... students do it for a laugh, because explorer cannot handle long paths!
ASKER
@Russ,
Let me try 7 Zip.
Let me try 7 Zip.
ASKER
@Andrew
"or drop to command prompt, and remove manually...." --> how do you do that?
"or drop to command prompt, and remove manually...." --> how do you do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@John,
Is Long Path Erase is free or commercial?
Is Long Path Erase is free or commercial?
Free!
ASKER
@Russ
In 7 Zip, I could not delete them.
In 7 Zip, I could not delete them.
ASKER
@Paul
DELTREE does not work on Server 2008.
DELTREE does not work on Server 2008.
free as a bird...here is the direct download link
ASKER
@John
LongPathEraser is a killer!
Thank you!
LongPathEraser is a killer!
Thank you!
ASKER
How about rebooting the machine...
ASKER
@John
I restarted the computer and re-ran it. It still crashes. The difference was that it looks longer to crash compare to prior to reboot.
I restarted the computer and re-ran it. It still crashes. The difference was that it looks longer to crash compare to prior to reboot.
What if you choose some folders deeper...is there a chance of permissions issue...i see the lock..so what if you run LPE as administrator
ASKER
@John,
I had tried running as "administrator" already.
I also tried to delete a sub-folder towards the end of list of sub-folders.
When I have more time, I will try a different level of sub-folders later.
I had tried running as "administrator" already.
I also tried to delete a sub-folder towards the end of list of sub-folders.
When I have more time, I will try a different level of sub-folders later.
Well here is another solution...i can't say i have tested it but if nothing helps...then..
In the article besides the solution there is also mention of using a Linux Live CD ...mounting the file system and erasing...i am not 100% sure about that..i can't remember i have done it in the past..so if any member has first hand experience it would be helpful
In the article besides the solution there is also mention of using a Linux Live CD ...mounting the file system and erasing...i am not 100% sure about that..i can't remember i have done it in the past..so if any member has first hand experience it would be helpful
ASKER
Ok. I will give that a shot.
drop to a command prompt
change directory to backup
and then type rd . /S
change directory to backup
and then type rd . /S
ASKER
@Andrew
"rd . /S" did not work. It still complains about "The file name is too long".
"rd . /S" did not work. It still complains about "The file name is too long".
in that case, you will need to enter each folder, and use
you may want to check what is causing it in he first place!
which was my fist suggestion!
Should not take too long, and in fact you could have done it by now..... time you've spent in this question!
rmdir
you may want to check what is causing it in he first place!
which was my fist suggestion!
Should not take too long, and in fact you could have done it by now..... time you've spent in this question!
ASKER
@John
(1) I downloaded node-v8.11.1-x64.msi and installed it on the computer.
(2) Restarted the computer.
(3) I ran npm i -g rimraf in command prompt.
C:\Data\Invoice\Backup>npm i -g rimraf
C:\Users\admin\AppData\Roa ming\npm\r imraf -> C:\Users\admin\AppData\Roa min
g\npm\node_modules\rimraf\ bin.js
+ rimraf@2.6.2
added 12 packages in 4.719s
(4) Then I ran C:\Data\Invoice\Backup>rim raf a
Since then, the node.exe RAM usage was on the rise for a while and is fluctuating. CPU utilization fluctuates too.
I will report back when it is done.
(1) I downloaded node-v8.11.1-x64.msi and installed it on the computer.
(2) Restarted the computer.
(3) I ran npm i -g rimraf in command prompt.
C:\Data\Invoice\Backup>npm
C:\Users\admin\AppData\Roa
g\npm\node_modules\rimraf\
+ rimraf@2.6.2
added 12 packages in 4.719s
(4) Then I ran C:\Data\Invoice\Backup>rim
Since then, the node.exe RAM usage was on the rise for a while and is fluctuating. CPU utilization fluctuates too.
I will report back when it is done.
ASKER
@Andrew
"you may want to check what is causing it in he first place!" --> The wrong use ROBOCOPY /MIR command created this problem. The damage is done and I need to remove these layers of sub-folders to free up space on the hard drive.
"you may want to check what is causing it in he first place!" --> The wrong use ROBOCOPY /MIR command created this problem. The damage is done and I need to remove these layers of sub-folders to free up space on the hard drive.
oh dear!!!!
ASKER
ASKER
@Andrew
"oh dear!!!!" ---> I said "OMG" when I realized what I did with ROBOCOPY command.
"oh dear!!!!" ---> I said "OMG" when I realized what I did with ROBOCOPY command.
ASKER
@John
Finally folder 'b' is also removed and now I have 600GB free space.
Thank you for your help and I appreciate it.
Finally folder 'b' is also removed and now I have 600GB free space.
Thank you for your help and I appreciate it.
ASKER
@moderator,
I like to re-assign points since the final solution was discovered after my initial point award.
I like to re-assign points since the final solution was discovered after my initial point award.