I am doing the same as described here i.e. In my batch file, I am using rmdir E:\docs\music /S /Q to delete all the content including sub directories too but it is removing parent directory music also which I don’t want.
Do I need to run mkdir everytime?
I am doing the same as described here i.e. In my batch file, I
Share
Single line solution uses
forto produce a list of the inner directories :You must escape the
%if you put that line in a batch file, like this :