Page 1 of 1

Compare a field in a data file

Posted: Wed Jan 11, 2023 1:36 pm
by VINMAN1958
I am still new to switch and learning as I go. I don't really know Java script to try and write something
The file comes over via FTP daily.

I am trying to compare a field in a data file to the system date.
I am using segment to try and isolate the date in the data file but not getting the results I am looking for.
I get the date properly out of the data file but can't get it to see the system date properly.

The data looks something like JoeSmoeToCompany2023-01-10 13-57-10.csv.gpg
The system date is 1/11/23 9.50.00

I only want the file to move when it match's the system date. If not move to a failure folder.
Then it emails to internal and external sources.

The other day for some reason after a restart it moved all the files from the FTP and sent 50 plus emails to the client.

Thanks for any help

Re: Compare a field in a data file

Posted: Wed Jan 11, 2023 1:47 pm
by jan_suhr
You can format the system date to look like 2023-01-10
Snag_65977388.png
Snag_65977388.png (36.54 KiB) Viewed 1756 times
And then you can use that to compare the date in the filename

Re: Compare a field in a data file

Posted: Wed Jan 11, 2023 3:01 pm
by VINMAN1958
Thanks, I will give that a try