Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Batch to delete all subfolders

jacastronunesjacastronunes Member Posts: 1
Hell0, i need to remove all subdirectories inside a directory, but i don't want to remove the base directory and it's files.



Thanks in advance

Comments

  • AlencarAlencar Member Posts: 2
    @ECHO OFF
    RD/S XXXXXXXXYYYYYYYYZZZZZZZ

    OR

    @ECHO OFF
    RD/Q XXXXXXXXYYYYYYYYZZZZZZZ

    Remove the last path folder but the files will be preserved.

    In the first case will ask for confirmation.
    In the second case will not ask for confirmation.

    Type RD /? for help of their own MS-DOS.
Sign In or Register to comment.