By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!I tried
DEL /a:d /e /s /x /n /y * but that said 0 files were deleted.
Any suggestions or should I make a suggestion on the feedback forum?
global /i /q if %@files[/h *] == 0 echo %_cwd
If you want to list empty folders then why are you trying to DELete something.
Well, this is fairly hideous:
Code:global /i /q if %@files[/h *] == 0 echo %_cwd
wouldn't this work better?
global /i /q if %@files[/s /h *] == 0 echo %_cwd
added the /S so it includes that could be in sub-folders.....
> global /i /q if %@files[/h *] == 0 echo %_cwd
Why is that 'fairly hideous'? (see earlier in thread)
for /r %d in ( nul ) if %@files[/h "%d\.."] == 0 echo %@path[%d]
This might be a good idea for a plugin to make possible?
@EMPTY[dir] = 1 (empty), 0 (non-empty), -1 (error), -2 (not found)
global /i /q if %@empty[.] == 1 echo %_cwd
I (Charles too) should have used "/H" with GLOBAL.
If it has subdirectories, I wouldn't even be tempted to call it empty.Yes.
I note that "empty directory" can mean different things: no files in the directory itself, no files in the directory or any of its subdirectories, no files or subdirectories (other than the . and .. entries) at all.
ATTRIB /D /S * 1>nul 2> empty.txt
TCC: (Sys) There are no more files.
"C:\Temp\TCMD20\plugins\*"
TCC: (Sys) There are no more files.
"C:\Temp\TEST_TCMD\ff\*"
TCC: (Sys) There are no more files.
"C:\Temp\TEST_TCMD\ProfileManager\*"
TCC: (Sys) There are no more files.
"C:\Temp\TEST_TCMD\test1\*"
TCC: (Sys) There are no more files.
"C:\Temp\WebServer2\LightTPD\logs\*"
[...]So it needs a little post-processing [...]
ssed.exe -e /^TCC.*denied.$/{;N;d} -e /^TCC:.*files.$/d -e s/\\\*// empty.txt
ssed.exe -e /^^TCC.*denied.$/{;N;d} -e /^^TCC:.*files.$/d -e s/\\\*// empty.txt