I am trying to develop a batch file to automatically remove empty folders in Drive D like the code below:
for /d %%d in (*.*) do (
rmdir %%d
)
However, while running the batch file by Windows's job scheduler, I found that the code tried to remove the empty folders into another drive. So how can I change this in coding (*.*)
to a specific drive D: ?