(Take Command 18.0 x64)
If I have folders:
a
a\b
a\b\c
all containing files, I can run 'del a /sxz' to delete all the folder contents and all the folders - but what if I want to only delete the subfolders, so I want to end up with just the 'a' folder?
I've tried 'del a\* /sxz' hoping that would iterate through the a\* folders and do the 'del /sxz' on those, but it just does the same as 'del a /sxz' and tries to delete the 'a' folder.
Any other ideas?
(More information)
Even though the problem happens with local folders as well, I'm actually trying to delete folders on an FTP server, so I can't use 'for' to iterate through the sub folders.
I don't have permission to delete the 'a' folder itself on the FTP server, so I'm getting an error message, so I can't just recreate the folder after deleting it. I'm trying to prevent the error message being generated.
If I have folders:
a
a\b
a\b\c
all containing files, I can run 'del a /sxz' to delete all the folder contents and all the folders - but what if I want to only delete the subfolders, so I want to end up with just the 'a' folder?
I've tried 'del a\* /sxz' hoping that would iterate through the a\* folders and do the 'del /sxz' on those, but it just does the same as 'del a /sxz' and tries to delete the 'a' folder.
Any other ideas?
(More information)
Even though the problem happens with local folders as well, I'm actually trying to delete folders on an FTP server, so I can't use 'for' to iterate through the sub folders.
I don't have permission to delete the 'a' folder itself on the FTP server, so I'm getting an error message, so I can't just recreate the folder after deleting it. I'm trying to prevent the error message being generated.