Jump to content

Delete script for D: partition except map Users


Edgar82

Recommended Posts

  • 3 months later...

You can check the folders through the cycle. It's gonna look like this:

 

@echo off

set allfolders = 'dir /b /s /a:d D:'

set usersfolder = 'D:\users\'

for /f "delims=" %%I in %%allfolders do

(

[here's the exception]

)

[here is the deletion]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...