Link to home
Start Free TrialLog in
Avatar of David XF
David XFFlag for United States of America

asked on

Delete the same files for multiple users

I have a terminal server running Windows 2008 R2 with about 100 users.  On each user's desktop, there is a folder.  I need to schedule a weekly batch file to delete the files inside of this folder for all users.

For one user, I can use this simple batch file:
     cd C:\Users\<username>\Desktop\ToBeDeleted
     Del *.* /Q

Is it possible to delete the contents of the "ToBeDeleted" folder for all users - all folders that are in C:\Users?
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America 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
Avatar of David XF

ASKER

That works perfectly.  Thanks for the help.