FTP Software Recommendation

We have are a, Epicor Public Cloud customer and we would like to use Bartender for some of our labels.
As a Cloud Customer - Epicor puts the Bartender text file on an FTP site and the we download it from the Epicor FTP site and save it in our local Bartender Server Watch folder and then bartender reads the file and prints the label.

I have used a program in the past WSFTP - however - i am wondering if anyone has a suggestion for an FTP program that will first download the files *.bt from an FTP site - and delete the same files after downloadng.

The problem with WSFTP is that i have to use the windows scheduler and i have not found an easy way to have windows check every 7 - 10 seconds.

Any suggestions welcome
DaveO

Is there any trigger to know when the .bt file is generated? You could potentially have that event write a record somewhere and then poll for new records. If found, your routine (technology agnostic) could go check the FTP site and grab the file to process. I don’t know anything about public cloud, just thinking general integration here

Is Fantastic, Free and even works with powershell

Also has a C# Nuget if you are coding inclined we use this to automate downloading from our bank for ACH transfers and such.

SessionOptions sessionOptions = new SessionOptions {
  Protocol = Protocol.Sftp,
    HostName = o.Host,
    UserName = o.User,
    SshHostKeyFingerprint = o.Fingerprint,
    SshPrivateKeyPath = Settings.Default.PrivateKeyPath,
    PrivateKeyPassphrase = Settings.Default.Passphrase,
};
using(Session session = new Session()) {

  // Connect
  session.Open(sessionOptions);
  TransferOptions to = new TransferOptions();
  to.PreserveTimestamp = false;
  to.TransferMode = TransferMode.Automatic;
  foreach(var file in session.ListDirectory(Settings.Default.RemoteDownloadPath).Files.ToList()) 
  {
    if (!file.IsDirectory) {
      var teArgs = session.GetFileToDirectory(file.FullName, outgoingDirectory, true, to); //True parameter deletes the file after download
    }
  }
}
2 Likes

Mr. Jose: Thank you for the suggestion - I am using WinSCP for another app - and it does work nicely - however it is difficult to schedule less that 60 seconds apart - i.e. i would like to check every 10 seconds.

DaveO

Mr. Aaron: Thank you for the suggestion – The file Is event is triggered by a BPM AutoPrint. However, as an Epicor Cloud customer I do not have access to the server at all.

I have done this In the past by adding an FTP script to my Bartender server that checks frequently. I used to use a SolarWinds FTP program called FtPCommander – however I do not see that avail anymore.

I also have used WinSCP – command line mode – but requires windows tasks – unfortunately if you want tasks less than a minute apart you have to do some trickery to do that.

Thanks for your reply – I am open to ideas – this seemingly simple thing – is not so simple :blush:

If you use the custom code option you can schedule however often you’d like.

However since this is for bartender I wonder if something like this may be more useful

This maps a “Network Drive” to an FTP and then you can probably just use that in bartender directly… (haven’t tried)

https://webdrive.com/ (commercial product that does the same)

1 Like

Mr. Jose: That sounds perfect - I will look deeper.

You ROCK!

DaveO

1 Like

Epicor’s Cloud Guide also mentions the following

Tip: Products that Epicor has tested and utilized are NetDrive ® and WebDrive ®. Both of these will allow you to map a local drive such as *P:* which will be the location of the FTP site where the BarTender files are dropped.

1 Like

Any? :thinking:

Soooo, I’m not a big fan or FTP or other shared folders to do work - mostly because it increases your attack surface. There’s a username and password to manage, supply-chain vulnerability with OS software, ports to open, etc. :face_vomiting:

I would take a page from the design of Epicor printing. Generate the .bt “file” and store that in a Character or _c field in a .UD table with information on about the label: what template, who generated it, workstation (or some other destination identifier), when it was created, and a status field. The status field would initially contain something like “Ready”.

Next (and you knew this was coming), I would create a function that looks for Ready records and pulls down the file over https. It’s easily scheduled for polling and you can use PowerShell or wget or whatever. The function would change the status to “Printed” and update a timestamp to “Printed”.

Better than polling would be a webhook where every time a record was written/updated with a status of “Ready” would send an event action to a site (think Azure Logic App) that would then pull and print the label. The login information and API-Key would be store in Azure Key Value. (I’m not sure if Epicor can use a managed identity to login though. :thinking: )

The added bonus doing it this way is having the ability to reprint an invoice just by changing the status back to “Ready” in the UD table right from a form in Epicor.

Like printing, there would be a job that would delete “Printed” records after some given amount of time.

No usernames/passwords, no extra software, reprint capability, … Just a thought.

Mr. :cloud:

3 Likes

Mr. Mark: interesting – That may be more hoops than I’m willing to jump right now. But I like the concept.

DaveO

Mr. Haso: I missed those references in the write-ups I saw – I will check them out.

Thanks for the suggestion,

DaveO

Think about it. Talk to @hkeric.wci, you just never know how long Epicor will support an FTP site. :thinking:

:rofl:

1 Like

Do you have a link to the cloud guide you’re quoting from?

I ended up using WinSCP to do the automated downloads.
I had trouble configuring the WebDrive - I seemed to only run for a logged in profile. I suppose i could have stuck to it however, at anther site i was able to get the WebDrive configured however i had trouble getting Bartender to delete the files.

WinSCP worked great and i have used it with TLS 2.0 sites as well. I also, added a batch script to “clean up” the bartender processed files. They may seem small but day after day, week after week they build up. I have my script configured to delete them after a week.

DaveO