v2 (below):
-ends with all zero/empty files/folders selected and ready to manual nuke.
-now it reports empty and zero-sized folders, too!
-easier to read and understand.
Code: Select all
//Report Empty Folders and Zero-Sized Files, v2
#263;//all items on a branch
#487;//Get Folder sizes
sortby "path", "a"; //alternate version: sortby "size", "a";
selfilter "Empty", d, "size";// Select empty folders
focus;//Without this only one focused item is returned
$folders = get("SelectedItemsPathNames", "<crlf>"); //copy full path/names
selfilter "0", d, "size";// Select folders with size = 0
focus;//Without this only one focused item is returned
$folders0 = get("SelectedItemsPathNames", "<crlf>"); //copy full path/names
selfilter "0", f, "size";// Select empty files/files with size = 0
focus;//Without this only one focused item is returned
$files = get("SelectedItemsPathNames", "<crlf>"); //copy full path/names
$report = "Empty Folders: <crlf>$folders <crlf><crlf>Folders with Size = 0 (zero): <crlf>$folders0 <crlf><crlf>Files with Size = 0 (zero): <crlf>$files <crlf><crlf>Have a nice day! ^^";
// sel;//cosmetic: de-select/unselect all
selfilter "0", f, "size";
selfilter "Empty", d, "size", 1;
selfilter "0", d, "size", 1;
copytext $report;
status "Path/Names paste into clipboard!";
text $report;
Code: Select all
//Report Empty Folders and Zero-Sized Files
#263;//all items on a branch
#487;//Get Folder sizes
sortby "path", "a"; //alternate version: sortby "size", "a";
selfilter "Empty", d, "size";// Select empty folders
focus;//Without this only one focused item is returned
$folders = get("SelectedItemsPathNames", "<crlf>"); //copy full path/names
selfilter "0", f, "size";// Select empty files
focus;//Without this only one focused item is returned
$files = get("SelectedItemsPathNames", "<crlf>"); //copy full path/names
$report = "Empty Folders: <crlf>$folders <crlf><crlf>Files with Size = 0 (zero): <crlf>$files <crlf><crlf>Have a nice day! ^^";
sel;//cosmetic: de-select/unselect all
copytext $report;
status "Path/Names paste into clipboard!";
text $report;