How to remove these files with name too long to delete so cleaning of ...\server\tomcat\work folder can proceed to install ifix ?
We are trying to install ifix7 on Windows/Tomcat CLM 5.0.2 and having issues cleaning up ...\rtc_502\JazzTeamServer\server\tomcat\work & ...\temp as prerequisite to install ifix7.
First time: we traveled down the deep dir tree to the leaves to remove the files OK. But on the second time (ifix7 crashed CLM, so the 2 dirs were cleaned again prior to restart the ifix'ed app): even going all the way down and permanent delete (instead of moving them to the recycle bin) the files at similar depth as below didn't help. Renaming these such files was not an option either.
...\rtc_502\JazzTeamServer\server\tomcat\workOBSOLETE\Catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\230-1438843629288
Even when travel down to the very depth of the dir tree to attempt (permanent) deletion:
There was no option (right cliick) to rename to shorten the name for deletion
This rename option (on right click) is available on normal files:
Any idea how to and what are these files ?
We had to rename ...\work to ...\workOBSOLETE
Accepted answer
Windows....
open a shell go into the root folder and use rmdir /Q/S foldername
open a shell go into the root folder and use rmdir /Q/S foldername
Comments
2 other answers
There are quite a few approaches suggested on http://stackoverflow.com and http://superuser.com and you may give them a try.
http://stackoverflow.com/questions/551072/how-to-delete-a-long-path-in-windows
http://superuser.com/questions/78434/how-to-delete-directories-with-path-names-too-long-for-normal-delete
http://stackoverflow.com/questions/551072/how-to-delete-a-long-path-in-windows
http://superuser.com/questions/78434/how-to-delete-directories-with-path-names-too-long-for-normal-delete
Comments
This worked on Windows Server 2012:
I've run into this problem numerous times and the solution I found (that works for a Windows environment) is outlined below:
When you want to completely delete a folder (the_dir_to_delete) and it contains files with long names inside it, robocopy does a VERY good job:
In a console window - cd to the containing folder (the one that contains the folder you need to delete)
mkdir empty_dir
robocopy empty_dir the_dir_to_delete /s /mir
rmdir empty_dir
rmdir the_dir_to_delete