[REQ]How can I delete empty folders in a batch?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
enineera
Junior Member
Junior Member
Posts: 37
Joined: 2005-09-28, 13:27 UTC

[REQ]How can I delete empty folders in a batch?

Post by *enineera »

Although I can use alt+shift+enter to show the size of my folders, I fail to sort the folders according to the size.

How can I delete empty folders in a batch?

Thanks in advance!
User avatar
van Dusen
Power Member
Power Member
Posts: 684
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

Post by *van Dusen »

Hello enineera,

not the wanted solution, but probably it helps anyway:

If you set the option

Configuration > Layout: Display > Sorting directories: Like files (also by time)

(instead of the option "Always by name"), then it's possible to sort directories by size (<Alt><Shift><Enter> to calculate the occupied space is still necessary)


EDIT:

Calculting the space can take a while... if you like to identify empty folders and 0-byte-folders, I recommend the content plugins

DirSizeCalc
fields:
<Empty>: Retrieves if a directory neither subdirectories nor files
<Contains files>: Retrieves if a directory contains any files
<Contains subdirectories>: Retrieves if a directory contains subdirectories

and / or

FileX
fields:
<EmptyDir>
<ZeroSizeDir>
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Re: [REQ]How can I delete empty folders in a batch?

Post by *Vochomurka »

enineera wrote:How can I delete empty folders in a batch?
I use XXcopy http://www.xxcopy.com/index.htm#download for that task. Batch file is

Code: Select all

xxcopy.exe %1 /rmdir /x*.* /yy
where %1 can be passed by Total Commander through %P parameter. I do exactly like this. It's very convenient.
Single user license #329241
PowerPro scripts for Total Commander
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Have you tried to use DelEmpty tool?
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
Post Reply