View previous topic :: View next topic |
Author |
Message |
thomas.mueller@envers.de
Joined: 26 Oct 2009 Posts: 34 Location: Duisburg, GERMANY
|
Posted: Fri Jan 15, 2016 2:44 am Post subject: Check for newest file |
|
|
Hi,
I need to check a folder for the existance of a file. The file is generated each day and files older than 3 days will be deleted. I now need to asure that one of the three existing files (the newest one) is not older than 24 hours. Any hint how I can do that?
Thanks |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
|
Back to top |
|
|
thomas.mueller@envers.de
Joined: 26 Oct 2009 Posts: 34 Location: Duisburg, GERMANY
|
Posted: Fri Feb 12, 2016 1:39 am Post subject: |
|
|
That works fine so far. Thanks!
What can I do if there are 20 versions of a file in the directory and there are three different files? I still need to chek for the newset version but this time for all three file names.
Example:
file1_20160201.bak
file1_20160131.bak
file1_20160130.bak
...
file2_20160201.bak
file2_20160131.bak
file2_20160130.bak
...
file3_20160201.bak
file3_20160131.bak
file3_20160130.bak |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Fri Feb 12, 2016 7:46 am Post subject: |
|
|
I think you need 20 Count Files tests
1)
File mask: file1_*.bak
Count files newer than 1440 min
Alert when folder contains more than 0 files
Reverse alert: enabled
2)
for 2nd test, use filemask for 2nd set of files
File mask: file2_*.bak
Count files newer than 1440 min
Alert when folder contains more than 0 files
Reverse alert: enabled
and so on
Regards
Alex |
|
Back to top |
|
|
thomas.mueller@envers.de
Joined: 26 Oct 2009 Posts: 34 Location: Duisburg, GERMANY
|
Posted: Fri Feb 12, 2016 8:57 am Post subject: |
|
|
Great!
Never clicked the drop-down-box in the count files-test!
New possibilities.... |
|
Back to top |
|
|
|