Page 1 of 1

Checking a file create date

Posted: Fri Jan 31, 2014 3:45 pm
by DataProcessor
I need to create a Goanywhere Monitor or a project that can check if the file create-date is the current system date. The Monitor that I created just executes a project and sends me an email but I wasn't able to get it to check if the file create date is current. Any suggestions would be appreciated. I just need to check if the file in a particular folder is current.

Re: Checking a file create date

Posted: Mon Feb 03, 2014 9:01 am
by Support_Rick
Inside the project that you are calling from your Monitor, you will need 2 separate tasks.

1- SetVariable Task: Use this to create a variable and assign the value as ${ CurrentDate }
2- CreateFileList Task: Use this with the "FileSet | DateFilter | Include" elements/attributes

It should look something like this:

Code: Select all
<setVariable label="Get Today&apos;s Date" name="Today" value="${ CurrentDate }" version="2.0" />

<createFileList label="Get list of Files" fileListVariable="MyList" version="1.0">
	<fileset dir="C:\Temp">
		<dateFilter>
			<include from="${Today}" />
		</dateFilter>
	</fileset>
</createFileList>