Hello,
I need to create a script and run it as a scheduled task but no idea where to start.
Basically log files are added to a folder on a daily basis and the folder name is the date. I need to delete anything that is older than 7 days so I need to keep 7 folders that contain a file each.
If I can do this on a daily basis that would be ideal or a weekly basis at a push as the files are pushing 700Mb each.
Eg.
D:\folder1\folder2\folder3\datefolder\file.txt
The only folders I need in the datefolder are from the last 7 days and a new one is added each day.
I have not googled anything yet, thought I would ask here first.
Any help appreciated. Scripting is not my forte.
I need to create a script and run it as a scheduled task but no idea where to start.
Basically log files are added to a folder on a daily basis and the folder name is the date. I need to delete anything that is older than 7 days so I need to keep 7 folders that contain a file each.
If I can do this on a daily basis that would be ideal or a weekly basis at a push as the files are pushing 700Mb each.
Eg.
D:\folder1\folder2\folder3\datefolder\file.txt
The only folders I need in the datefolder are from the last 7 days and a new one is added each day.
I have not googled anything yet, thought I would ask here first.
Any help appreciated. Scripting is not my forte.

Comment