[ad_1]
I’ve previously posted here about asking how to clear files from subdirectories and it turned out pretty well.
Since I’m dealing with student accounts (I’m the school lab custodian) and I need to clear them out before the new school year starts, I decided to make a batch file for it.
Students tend to make folders of their documents within their respective accounts. I need a way to delete those folders without deleting the directory where it is placed.
For a visual context:
Student accounts hierarchy chart
I need to clear out the contents at the level of CL01-01 without it being deleted as well.
I tried using rmdir but it wiped out all directories under STUDENTS (thankfully, I’m still on the testing phase of this and used a dummy STUDENTS folder)
[ad_2]