Link to home
Start Free TrialLog in
Avatar of ttrbrtsn
ttrbrtsnFlag for United States of America

asked on

how to exclude a folder from being deleted

i have a subfolder in the users directory. as youcan see, the batch file deletes it. the folder name is OSERV. how can i keep the script but keep OSERV untouched. i cannot move this folder from the USERS directory



Del "E:\Scanning\Users\*.*" /F /Q /S



thanks
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or something like this

for %i in ("E:\Scanning\Users\*.*") do if not %i == OSERV del %i /F /Q /S

Open in new window

Avatar of Seth Simmons
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: HainKurt (https:#a42251449)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer