EDI with VAN, particularly CovalentWorks

We are switching from AS400 platform to Windows based for all applications, including EDI.  We know how to generate our X12 transaction sets and have tested successfully with two financial institutions.  Windows based solution uses FTP.

We have one customer who must go through a VAN.  With the AS400 we would send/receive one file and the VAN broke out to whom the data would be sent based upon ISA record.  That option is not available to us when we switch to FTP.

Our script is similar to:
Script to get our file
Open ftpsitename
cd /Inbox
get NameOfFile.TXT c:\Folder\FileName.txt

Script to send a file
Open ftpsitename
cd /Outbox
put c:\Location\FileName.txt

Our problem is that our customer could send multiple files and our VAN says we will have to "Get" the files by file name.  I kind of understand that we could use "MGET" but then how could we control processing unknown file names after receiving the file(s).
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Not quite sure I understand what you're having trouble with.

Are you having troubles getting multiple files from the FTP site?

Or are you having troubles processing those files through the VAN after getting the files?
jhinsonAuthor Commented:
Sorry for confusion.  Let's say there are 3 files in my inbox.  FileA, FileB, and FileC.  I could (if I knew the file name) GET each file by file name or I could MGET all files at once (as I understand FTP).  But after MGET the script would not know the file names, correct?  So without human intervention (renaming each file, then processing) how could I process the 3 unknown files?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I see .... I'm no FTP Expert, so I can't really know if there is a method where you can GET a file and name it to something you'd more easily process, but:

Could you not GET the files to a specific location on the machine, and then have your script process all files in that directory, regardless of the name? After processing, you could then delete or move the files from that directory. I do a good bit of EDI work, and that's what many of the systems I work with do - they grab the files, process them, and then remove/move them.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.