Page 1 of 1

Find Filename in file list

Posted: Mon Dec 05, 2016 12:22 pm
by Grodaes
Hello,

I am new to GAMFT however I am trying to have a monitor capture a file list at a specific time and send an email to tell me if certain files are missing from that list. I get a group of files around the same time and only need to know what files are missing. Is there any way to create a "Ideal" vs "real" file list comparison?

EG:
File1 File1
File2
File 3 File3

Email return:
File 2 is missing.

Re: Find Filename in file list

Posted: Mon Dec 05, 2016 12:25 pm
by Support_Rick
The only way to accomplish this would be to have your "ideal" file list in a Spreadsheet, CSV or Database table somewhere that you can compare against. Then, loop through the file list, see if it exists in your "real" vs. "ideal" comparison and then you can identify what is missing.

You could do a file number comparison to begin with and if all the files exists in one and the other, the count should be the same.

Re: Find Filename in file list

Posted: Mon Dec 05, 2016 12:28 pm
by Grodaes
Thanks Rick,

So typically these files have a datestamp so I suppose i could put some prefaces into a csv and then loop adding the time stamp.

Is there seriously no way to look into a fileset and see what it contains?

Re: Find Filename in file list

Posted: Mon Dec 05, 2016 12:30 pm
by Support_Rick
Yes, a ForEach loop across the filelist variable allows you to view each file and each file's attributes.

Re: Find Filename in file list

Posted: Mon Dec 05, 2016 12:40 pm
by Grodaes
Perfect! Thanks a bunch!