Avatar of Damarado

asked on 

Script to clean up folders and sub folders on file server


I am looking for a script that will run on a scheduled weekly task and deletes any content in the folders older then one week.

Our file server is running windows 2012.

There are users with root and sub folders as shown

     user                            jreeds
     subfolders                 jreeds-a1

I only want the content scrubbed from the sub folders for each user, not the root folder for the user
Any files older than a week will be deleted, otherwise left alone.

any new folders in the sub folders will not be touched.

Windows BatchVB ScriptWindows Server 2012Shell ScriptingPowershell

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon