Exclude Files within the last hour

If you have a new question you’d like our support staff to post a response to, please visit our customer community, Data Security Insiders, to pose the question in our Discussion Boards. We have a thread “Ask Our Tech Experts” that our support team monitors on a regular basis, or you can start a new discussion where other GoAnywhere users and support staff can weigh in. Log in or create your new account at https://insiders.helpsystems.com/sign_in.

If you need an immediate response, please create a support ticket or contact our support team by email at [email protected].
2 posts Page 1 of 1

estepj01

Posts: 1
Joined: Thu Sep 14, 2017 1:30 pm

Post by estepj01 » 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

Support_Jerrod

Support Specialist
Posts: 11
Joined: Wed Dec 13, 2017 5:52 pm

Post by Support_Jerrod » Fri Dec 15, 2017 11:24 am
Hello Joe,

In this situation, you will only need to use one timestamp task and add a format. This will allow you to set the “Hour” field to -1. The value of the timestamp variable will now be the current date/time that the project is executed minus one hour. Now, when defining the date filter for the file set, you will want to use your Timestamp variable in the To Date field, leave the From Date field blank, and set the Date Filter of type Include. Leaving the From Date blank tells the filter that you want all files that have been modified before the specified To Date. This will ensure that your filelist is created with all files that are older than one hour at the time the project is executed. I have attached a copy of the modified project using this logic.

Thank you,

Jerrod Foster
Product Specialist
Attachments
Files Older Than One Hour.xml
Example Project
(1001 Bytes) Downloaded 832 times
Jerrod Foster
Support Analyst

e. [email protected]
p. 1.800.949.4696
w. HelpSystems.com
2 posts Page 1 of 1