Hi, can GoAnywhere be used to retrieve information about a file on a Windows server, such as the last time a file was updated? We have a case where a file sits on a Windows server and always has data in it, but if today's update did not run, the data would be from yesterday. Can I use GA to retrieve the last update time of the file and match that against the current date to see if I want to process the data? This would be similar to the DSPFD command on the AS400, or the DIR command on a windows system to see the date of a file.
Hi Julie, I'm not sure where I would use this variable reference syntax you mention, and I'm not finding anything in the Webhelp. Can you point me in the right direction or show me a code snippet of how it is used?
Use the print statement to write the last changed date out to a file, then read it in as a delimited file using a space as the delimiter. You then have to do a set variable version 1.0 task to get the date out of the rowset. It will be in yyyy-MM-dd format. If you don’t want the dashes, you can do a search and replace on the file before you do the read CSV.
Here are the XML lines without a search and replace