How can we automate an FTP action from a folder on our server?
June 5, 2009 9:19 AM
Subscribe
Question #1767346834 in our exhausting ERP integration process: Is there a way to automate an FTP process so that "Everytime file x lands in folder y, we send file x to ftp://whatever/import"? More inside.
So, our unbearably expensive ERP lacks some common features. It has some pretty heinous import/export functionality which has made sending and receiving information a major struggle. But after an endless string of late-nights/all-nighters, we're getting somewhere!
New problem: The system is more than happy to export stuff. But it won't FTP it anywhere. Because we've got about 100+ files exporting a day, it's almost impossible to be doing this manually. The most it will do is reliably export it to the same folder on it's own server every time.
So we need to set up a process where anytime a file lands in that folder, it sends it along to our warehouse, which has it's own FTP.
Thoughts?
posted by GilloD to technology (9 comments total)
If it's Windows or DOS, something like this works:
goto RunLoop
:RunLoop
if exist *.* for %%D in (*.*) do set FILENAME=%%D
if exist %FILENAME% goto FoundFile
Sleep 1
goto RunLoop
:FoundFile
{put unattended FTP command here}
del %FILENAME%
goto RunLoop
posted by AzraelBrown at 9:26 AM on June 5