THE BORE

General => The Superdeep Borehole => Topic started by: GilloD on April 14, 2009, 04:06:23 PM

Title: XP: Possible to auto-upload contents of a folder?
Post by: GilloD on April 14, 2009, 04:06:23 PM
Okay, here's the rub. We have an ERP system that publishes a CSV of different kids of data a couple times a day. It also LOOKS for data CSV's in a few folders. However, when it EXPORTS data, it can only do so to a client machine- Not to another server. Don't ask me why.

So what I'm trying to find out is: Is there a program out there that will allow me to say like, "Everytime export.csv shows up in this folder, FTP it to www.whatever.com"? What are my options in this regard?
Title: Re: XP: Possible to auto-upload contents of a folder?
Post by: Tauntaun on April 14, 2009, 04:16:36 PM
Okay, here's the rub. We have an ERP system that publishes a CSV of different kids of data a couple times a day. It also LOOKS for data CSV's in a few folders. However, when it EXPORTS data, it can only do so to a client machine- Not to another server. Don't ask me why.

So what I'm trying to find out is: Is there a program out there that will allow me to say like, "Everytime export.csv shows up in this folder, FTP it to www.whatever.com"? What are my options in this regard?

Thread is off to a sexy start.   :tauntaun
Title: Re: XP: Possible to auto-upload contents of a folder?
Post by: Ecrofirt on April 14, 2009, 09:05:31 PM
Well, the good news is that at the very least, this probably isn't all that hard to program if you need to. You could have a script run as a scheduled task on that folder once a minute, and then do the upload if the file(s) exist.
Title: Re: XP: Possible to auto-upload contents of a folder?
Post by: Ecrofirt on April 14, 2009, 09:09:42 PM
For instance:
http://www.unagibay.com/DesktopDefault.aspx?tabindex=1&tabid=100&itemid=1807

All you need is a bit of code above that to check if whatever.csv exists, or whatever your criteria is.

Note: Modify the run line to look like this:
objShell.Run "c:\winnt\system32\ftp.exe -s:ftpput.txt",0 ,True

And it'll run the ftp program without opening a window for it.