If you have a new question you’d like our support staff to post a response to, please visit our customer community, GoAnywhere 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.goanywhere.com.
If you need an immediate response, please create a support ticket or contact our support team by email at
[email protected].
-
FNova
- Posts: 1
- Joined: Mon Apr 16, 2018 10:41 am
I've been learning as I go with GA, and am trying to figure out the steps here:
I've got a folder where there is a new file every 4 hours. The naming convention is:
yyyyMMddhhmm_Widget_.xz
Basically, I just need to figure out how to pull the latest file (I tried setting timestamp variables, but I haven't gotten it to work), but once I can set a variable for the filename, I can create a checksum file that is basically ${latestfile}.md5, which I can then print into the directory where the file is located.
I looked through the forum, as I'm guessing this is pretty rudimentary, but couldn't find a solution?
Can someone please assist?
Thanks!
-
Support_Julie
Support Specialist
- Posts: 91
- Joined: Thu Mar 05, 2009 3:49 pm
- Location: Ashland, NE USA
-
On your date manipulation, it should be just -3, not ${-3}
Also, when you reference your variables on the Create File List, always assume that case matters.
Your variable is defined as Minus3, but you are referencing it in the data filter as ${minus3}
Since you are looking at the time, I would add that to the date format.
Your Project XML:
Code: Select all
<timestamp label="Set Minus3" version="1.0">
<format outputVariable="Minus3" pattern="yyyy-MM-dd" hour="${-3}" />
</timestamp>
<timestamp label="Set Minus5" version="1.0">
<format outputVariable="Minus5" pattern="yyyy-MM-dd" hour="${-5}" />
</timestamp>
<createFileList label="Create LatestFile" fileListVariable="LatestFile" version="1.0">
<fileset dir="resource:s3://fpq-s3-tc-vessel-prd/staging/TradeCompliance/staging" recursive="false" sortedBy="last modified" sortOrder="descending">
<dateFilter>
<include from="${minus3}" to="${minus5}" />
</dateFilter>
</fileset>
</createFileList>
Suggested Project XML:
Code: Select all<timestamp _tmplitem="30" label="Set Minus3" version="1.0">
<format _tmplitem="30" outputVariable="Minus3" pattern="yyyy-MM-dd HH:mm:ss" hour="-3" ></format>
</timestamp>
<timestamp _tmplitem="30" label="Set Minus5" version="1.0">
<format _tmplitem="30" outputVariable="Minus5" pattern="yyyy-MM-dd HH:mm:ss" hour="-5" ></format>
</timestamp>