Exclude Files within the last hour
Posted: Fri Dec 01, 2017 11:18 am
I want to monitor a folder and make sure a file is deleted (picked up) within an hour and email me if it is not.
In A project I tried:
Connect to Remote Server, use "List Files""
see if any file is over an hour old based on # Files found and use a "Date" filter to "exclude" files using:
From Date:${AdjustDateTime(CurrentTimestamp('yyyy-MM-dd HH:mm:ss'), 'yyyy-MM-dd HH:mm:ss', 'hours', -1)}
To Date: ${AdjustDateTime(CurrentTimestamp('yyyy-MM-dd HH:mm:ss'), 'yyyy-MM-dd HH:mm:ss', 'hours', -0)}
Tried using Variables with format 'yyyy-MM-dd HH:mm:ss'
tried hard coded dates such as: 2017-12-01 08:54:21
Nothing seems to work For excluding files for last hour, the Exclude "Date" filter just seems to work for entire days/dates
Anybody else have luck doing something like this.
Thanks,
Joe
In A project I tried:
Connect to Remote Server, use "List Files""
see if any file is over an hour old based on # Files found and use a "Date" filter to "exclude" files using:
From Date:${AdjustDateTime(CurrentTimestamp('yyyy-MM-dd HH:mm:ss'), 'yyyy-MM-dd HH:mm:ss', 'hours', -1)}
To Date: ${AdjustDateTime(CurrentTimestamp('yyyy-MM-dd HH:mm:ss'), 'yyyy-MM-dd HH:mm:ss', 'hours', -0)}
Tried using Variables with format 'yyyy-MM-dd HH:mm:ss'
tried hard coded dates such as: 2017-12-01 08:54:21
Nothing seems to work For excluding files for last hour, the Exclude "Date" filter just seems to work for entire days/dates
Anybody else have luck doing something like this.
Thanks,
Joe