DOS batch file schedule to delete empty folders directories recursively

If you want to delete all empty folders and sub folders recursively from D:\FTPROOT then here is the ready to use syntex with an example:

Syntex = Prompt:> Drive:\Delete_empty_folders_directories.bat

Example = C:\Delete_empty_folders_directories.bat

for /f "usebackq delims=" %%d in (`"dir /ad/b/s D:\FTPROOT"`) do rd "%%d"

Recommended to use this DOS batch script file after delete all old files not accessed after XX days.

Monika K

I believe in knowledge sharing by way to provide solution for any kind of issues which ultimately saves human hours so affords may utilize on undiscovered ideas, concepts and creativity. Hence, I love blogging on technology, marketing, travel and health. Require professionally written blog article? Feel free to contact me.