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].
2 posts Page 1 of 1

FNova

Posts: 1
Joined: Mon Apr 16, 2018 10:41 am

Post by FNova » Thu Jan 10, 2019 12:22 pm
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

User avatar
Support Specialist
Posts: 91
Joined: Thu Mar 05, 2009 3:49 pm
Location: Ashland, NE USA

Post by Support_Julie » Mon Apr 22, 2019 2:52 pm
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>

Julie Rosenbaum
Sr Support Analyst
e. [email protected]
p. 1.800.949.4696
w. HelpSystems.com
2 posts Page 1 of 1