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!
Trying to create a file variable to create a checksum
Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
- Support_Julie Offline
- Support Specialist
- Posts: 91
- Joined: Thu Mar 05, 2009 3:49 pm
- Location: Ashland, NE USA
- Contact:
Re: Trying to create a file variable to create a checksum
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:
Suggested Project XML:
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>
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>