I tried to write a script that deletes all files older than 7 days from a directory.
If I execute the script once, all files older than 7 days are deleted. If I execute the script a second time, the newer files are also deleted. I found out that:
- if a directory contains one or more older file -> the older files are deleted correctly
- if a directory contains only newer files -> the whole directory is deleted
Note: the following Knowledge Base article affects this topic, I think I followed the sequence described there:
http://www.scootersoftware.com/suppo...kb_filters.php
Code:
load "G:\BACKUP TEST 7 TAGE" expand all filter cutoff:>7days select all delete recyclebin=no all
- if a directory contains one or more older file -> the older files are deleted correctly
- if a directory contains only newer files -> the whole directory is deleted
Note: the following Knowledge Base article affects this topic, I think I followed the sequence described there:
http://www.scootersoftware.com/suppo...kb_filters.php
Comment