Zoom7000 Posted June 19, 2013 Posted June 19, 2013 The school has a Functional Skills exam coming up and I need to delete the contents of the exam users folders. I have tried the following command but it only deletes files and not folders. Is there anyway I can force it to delete everything? DEL /Q /S "E:\Users\ExamUsers\Exam51\*.*" DEL /Q /S "E:\Users\ExamUsers\Exam52\*.*" DEL /Q /S "E:\Users\ExamUsers\Exam53\*.*" Etc.. I don't want to delete the top level folder (i.e. Exam51, 52 etc) just empty out the contents.
FN-GM Posted June 19, 2013 Posted June 19, 2013 Just a quick and dirty way you could use robocopy robocopy "source" "E:\Users\ExamUsers\Exam51" /MIR robocopy "source" "E:\Users\ExamUsers\Exam52" /MIR Make the source folder empty. We use this for sending files to the functional skills home areas, so might be handy for that. 1
Steve21 Posted June 19, 2013 Posted June 19, 2013 Del only does files. Think it's RD for folders? e.g. RD /S /Q "path" Steve
Zoom7000 Posted June 19, 2013 Author Posted June 19, 2013 Just a quick and dirty way you could use robocopy robocopy "source" "E:\Users\ExamUsers\Exam51" /MIR robocopy "source" "E:\Users\ExamUsers\Exam52" /MIR Make the source folder empty. We use this for sending files to the functional skills home areas, so might be handy for that. Thanks, I will try that! Del only does files. Think it's RD for folders? e.g. RD /S /Q "path" Steve I've tried RD, but it removes the root folder too! Don't want that!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now