Link to home
Start Free TrialLog in
Avatar of bhamguy3131
bhamguy3131

asked on

Sweep a watch Folder and Copy to a Local FTP folder

We would like a user friendly program to sweep a watch folder every 30 seconds and copy the PDF , " Cut", over to a local FTP folder on the same subnet.

I am aware that scripting can easily do this but need something for the average user to watch , monitor and basic troubleshoot.

Would love free but , $50 ??, bucks is very tolerable.

Would greatly appreciate any suggestions, in particular , a product that has a good support desk that answers by email or even over phone .

Thank you much for your time and expertise in considering this matter.
ASKER CERTIFIED SOLUTION
Avatar of Ben Personick (Previously QCubed)
Ben Personick (Previously QCubed)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kimputer
Kimputer

Yes, this can be easily programmed for a reasonable suggested US$50
That's in case of removing file after the ftp transfer is done.
If not, it needs more programming (so it won't transfer the file a second time)
Contact me if you want this program to be built: kimputer@gmail.com
use a basic script

debug will be easy : if files older than 30 seconds are found in the directory, the script did not work

if you script it trivially, any file that could not be copied for some reason will be tried again with the next run so users do not need to do anything unless the ftp server password or location is changed

in unix shell you'd do something like this

find DIRNAME | while read filename
do wput "$filename" ftp://USER:PASSWORD@HOSTNAME/path/to/dest/dir/ && rm "$filename"
done

you can easily modify this script to send an email in case of error, and/or log such information

whatever the solution, you need to make sure that the files in the drop directory are not partially written. depending on how files are written to the watch dir, this may or may not be an issue

---

@Kimputer : what you are doing is forbidden on EE. there are dedicated sites for freelance jobs
@skullnobrains Ouch, sorry, Edit comment button is only there after you submitted, not after you return much later :(
You could do it in Robo-FTP and archive the sent files like this:
WORKINGDIR "c:\source\folder\"
ARCHIVEDIR "c:\sent\files\" 
:send_files
FTPLOGON "192.168.1.13" /user="UserID" /pw="secret"
SENDFILE "*.pdf" /archive
FTPLOGOFF
PAUSE /for=30
GOTO send_files

Open in new window


Or you could just delete the files after they are sent like this:
WORKINGDIR "c:\source\folder\"
:send_files
FTPLOGON "192.168.1.13" /user="UserID" /pw="secret"
SENDFILE "*.pdf" /delete 
FTPLOGOFF
PAUSE /for=30
GOTO send_files

Open in new window


Note: Robo-FTP automatically verifies that the upload was successful before archiving or deleting the source file.
Avatar of bhamguy3131

ASKER

Bought it and it worked