It's all about the answers!

Ask a question

How to remove these files with name too long to delete so cleaning of ...\server\tomcat\work folder can proceed to install ifix ?


long TRUONG (3654123147) | asked Aug 09 '15, 5:12 a.m.
edited Aug 09 '15, 5:14 a.m.
 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:
Name too long to delete files


There was no option (right cliick) to rename to shorten the name for deletion
Name too long no option to rename


This rename option (on right click) is available on normal files:
Rename option on regular files:



Any idea how to and what are these files ?

We had to rename ...\work to ...\workOBSOLETE

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Aug 09 '15, 9:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Windows....

open a shell go into the root folder and use rmdir /Q/S foldername
long TRUONG selected this answer as the correct answer

Comments
long TRUONG commented Aug 09 '15, 12:48 p.m. | edited Aug 09 '15, 1:22 p.m.

 Thx Ralph,


My comments too long, so have to use this answer space.

The rmdir command, even with /Q/S, would not remove a non-empty dir, did not try any variation in level or switch.  Maybe by root dir you meant bottom parent dir (of those files), but did not try that.

Your direction reminded me of using the Unix rm command, and it successfully removed these files though it looked weird on the long way (output side)  there:



D:\IBM\rtc_502\JazzTeamServer\server\tomcat\workOBSOLETE>rmdir /q/s Catalina
Catalina\LOCALH~1\ccm\eclipse\CONFIG~1\ORGECL~1.OSG\bundles\32\data\AE262F~1 - The directory is not empty.

D:\IBM\rtc_502\JazzTeamServer\server\tomcat\workOBSOLETE>rmdir /Q/S Catalina
Catalina\LOCALH~1\ccm\eclipse\CONFIG~1\ORGECL~1.OSG\bundles\32\data - The directory is not empty.

D:\IBM\rtc_502\JazzTeamServer\server\tomcat\workOBSOLETE>rm -R Catalina
rm: descend directory catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data', overriding mode 0777? y </div> <div> rm: catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data: No such file or directory </div> <div> rm: catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data: No such file or directory </div> <div> rm: descend directorycatalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32', overriding mode 0777? y
rm: catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32: No such file or directory
rm: catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32: No such file or directory
rm: descend directory catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles', overriding mode 0777? y </div> <div> rm: catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles: No such file or directory </div> <div> rm: catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles: No such file or directory </div> <div> rm: descend directorycatalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi', overriding mode 0777? y
rm: catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi: No such file or directory
rm: catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi: No such file or directory
rm: descend directory catalina\localhost\ccm\eclipse\configuration', overriding mode 0777? y </div> <div> rm: catalina\localhost\ccm\eclipse\configuration: No such file or directory </div> <div> rm: catalina\localhost\ccm\eclipse\configuration: No such file or directory </div> <div> rm: descend directorycatalina\localhost\ccm\eclipse', overriding mode 0777? y
rm: catalina\localhost\ccm\eclipse: No such file or directory
rm: catalina\localhost\ccm\eclipse: No such file or directory
rm: descend directory catalina\localhost\ccm', overriding mode 0777? y </div> <div> rm: catalina\localhost\ccm: No such file or directory </div> <div> rm: catalina\localhost\ccm: No such file or directory </div> <div> rm: descend directorycatalina\localhost', overriding mode 0777? y
rm: catalina\localhost: No such file or directory
rm: catalina\localhost: No such file or directory

D:\IBM\rtc_502\JazzTeamServer\server\tomcat\workOBSOLETE>ls

D:\IBM\rtc_502\JazzTeamServer\server\tomcat\workOBSOLETE>

_________

Listing of files before deletion

D:\IBM\rtc_502\JazzTeamServer\server\tomcat\workOBSOLETE>ls -l
total 0
drwxrwxrwx   1 user     group           0 Aug  5 23:46 Catalina

...
Catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6=:
total 0
drwxrwxrwx   1 user     group           0 Aug  7 08:32 230-1438843629288

ls: Catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\230-1438843629288\com.ibm.team.repo
sitory.migration.internal.applicationmigration.query.BaseApplicationMigrationStatusQueryModel$ApplicationMigrationStatusQueryModel: No such file or di
rectory
ls: Catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\230-1438843629288\com.ibm.team.repo
sitory.migration.internal.applicationmigration.query.BaseApplicationMigrationStatusQueryModel$ManyApplicationMigrationStatusQueryModel: No such file o
r directory
ls: Catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\230-1438843629288\com.ibm.team.repo
sitory.service.diagnostic.diagnostictests.query.BaseDiagnosticTestResultItemQueryModel$DiagnosticTestResultItemQueryModel: No such file or directory
ls: Catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\230-1438843629288\com.ibm.team.repo
sitory.service.diagnostic.diagnostictests.query.BaseDiagnosticTestResultItemQueryModel$ManyDiagnosticTestResultItemQueryModel: No such file or directo
ry
Catalina\localhost\ccm\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\230-1438843629288=:
total 0

Catalina\localhost\jts=:
total 0
drwxrwxrwx   1 user     group           0 Aug  7 08:33 eclipse

...
Catalina\localhost\jts\eclipse\configuration\org.eclipse.osgi\bundles\32\data=:
total 0
drwxrwxrwx   1 user     group           0 Aug  7 08:33 ae262f3c8390ef9f8650e3f0095bb8f6

Catalina\localhost\jts\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6=:
total 0
drwxrwxrwx   1 user     group           0 Aug  7 08:33 109-1438843758799

ls: Catalina\localhost\jts\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\109-1438843758799\com.ibm.team.repo
sitory.migration.internal.applicationmigration.query.BaseApplicationMigrationStatusQueryModel$ApplicationMigrationStatusQueryModel: No such file or di
rectory
ls: Catalina\localhost\jts\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\109-1438843758799\com.ibm.team.repo
sitory.migration.internal.applicationmigration.query.BaseApplicationMigrationStatusQueryModel$ManyApplicationMigrationStatusQueryModel: No such file o
r directory
ls: Catalina\localhost\jts\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\109-1438843758799\com.ibm.team.repo
sitory.service.diagnostic.diagnostictests.query.BaseDiagnosticTestResultItemQueryModel$DiagnosticTestResultItemQueryModel: No such file or directory
ls: Catalina\localhost\jts\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\109-1438843758799\com.ibm.team.repo
sitory.service.diagnostic.diagnostictests.query.BaseDiagnosticTestResultItemQueryModel$ManyDiagnosticTestResultItemQueryModel: No such file or directo
ry
Catalina\localhost\jts\eclipse\configuration\org.eclipse.osgi\bundles\32\data\ae262f3c8390ef9f8650e3f0095bb8f6\109-1438843758799=:
total 0

Catalina\localhost\rm=:
total 0
drwxrwxrwx   1 user     group           0 Aug  7 08:33 eclipse

...
Catalina\localhost\rm\eclipse\configuration\org.eclipse.osgi\bundles\29\data=:
total 0
drwxrwxrwx   1 user     group           0 Aug  7 08:33 ae262f3c8390ef9f8650e3f0095bb8f6

Catalina\localhost\rm\eclipse\configuration\org.eclipse.osgi\bundles\29\data\ae262f3c8390ef9f8650e3f0095bb8f6=:
total 0
drwxrwxrwx   1 user     group           0 Aug  7 08:33 142-1438843822508

ls: Catalina\localhost\rm\eclipse\configuration\org.eclipse.osgi\bundles\29\data\ae262f3c8390ef9f8650e3f0095bb8f6\142-1438843822508\com.ibm.team.repos
itory.migration.internal.applicationmigration.query.BaseApplicationMigrationStatusQueryModel$ApplicationMigrationStatusQueryModel: No such file or dir
ectory
ls: Catalina\localhost\rm\eclipse\configuration\org.eclipse.osgi\bundles\29\data\ae262f3c8390ef9f8650e3f0095bb8f6\142-1438843822508\com.ibm.team.repos
itory.migration.internal.applicationmigration.query.BaseApplicationMigrationStatusQueryModel$ManyApplicationMigrationStatusQueryModel: No such file or
 directory
ls: Catalina\localhost\rm\eclipse\configuration\org.eclipse.osgi\bundles\29\data\ae262f3c8390ef9f8650e3f0095bb8f6\142-1438843822508\com.ibm.team.repos
itory.service.diagnostic.diagnostictests.query.BaseDiagnosticTestResultItemQueryModel$DiagnosticTestResultItemQueryModel: No such file or directory
ls: Catalina\localhost\rm\eclipse\configuration\org.eclipse.osgi\bundles\29\data\ae262f3c8390ef9f8650e3f0095bb8f6\142-1438843822508\com.ibm.team.repos
itory.service.diagnostic.diagnostictests.query.BaseDiagnosticTestResultItemQueryModel$ManyDiagnosticTestResultItemQueryModel: No such file or director
y
Catalina\localhost\rm\eclipse\configuration\org.eclipse.osgi\bundles\29\data\ae262f3c8390ef9f8650e3f0095bb8f6\142-1438843822508=:
total 0



long TRUONG commented Aug 10 '15, 12:35 a.m.

Today I have to do this task again. Unix rm -R no longer works, but what you suggested "rmdir /Q/S" worked from any level ! :)

2 other answers



permanent link
Donald Nong (14.5k614) | answered Aug 10 '15, 12:26 a.m.
edited Aug 10 '15, 12:26 a.m.
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

Comments
long TRUONG commented Aug 10 '15, 12:38 a.m.

Thx Don,

Today Unix "rm -R" no longer worked, but Ralph's suggestion "rmdir /Q/S" worked from any level.

Hence I will keep "using 7zip manager" for next time.


long TRUONG commented Aug 25 '15, 6:04 p.m.

on 8/10 neither Unix "rm -R" nor Ralph's suggestion "rmdir /Q/S" worked, dir was renamed.

today tried 7zip manager, did not work either:

If delete to Recycle bin got error too long

If delete permanently got error not found.


permanent link
Daniel Barbour (250323) | answered Apr 18 '16, 3:24 p.m.
 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

 

 

Basically it ‘mirrors’ an empty folder into the folder you want 

Comments
long TRUONG commented Apr 19 '16, 1:54 p.m.

 Thx Daniel,


This is cool, will try it on those dirs I had to mark obsolete.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.