Compare a field in a data file

Post Reply
VINMAN1958
Newbie
Posts: 3
Joined: Mon Jan 09, 2023 3:53 pm

Compare a field in a data file

Post 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
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Compare a field in a data file

Post 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 871 times
And then you can use that to compare the date in the filename
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
VINMAN1958
Newbie
Posts: 3
Joined: Mon Jan 09, 2023 3:53 pm

Re: Compare a field in a data file

Post by VINMAN1958 »

Thanks, I will give that a try
Post Reply