Last week a customer of mine told me he had to upload the same file at the same time everyday and he did this manually using some ftp-client. He asked me if there was some easier way to do this.
Allthough i’m sure that there are different ftp-clients out there that can handle automated up- and downloads (i have been using the same ws_ftp light client for years and it still works for me, i don’t think the ftp-protocol has changed much the past twenty years), i decided to take another approach.
I don’t know if many people are aware of it, i was not, but windows comes shipped with a ftp-client on board. Just type ftp in a dosbox and your ready to do your ftp’ing! And the great thing is that you can put your commands in a text-file and run those commands with the command ‘ftp textfile.txt’.
So i wrote a small textfile (ftp.txt) for uploading a file:
open yourftphostname.com
yourftpusername
yourftppassword
cd /yourremoteuploaddirectory
mput c:\\thefiletoupload.txt
y
close
bye
And a batch file (upload.bat) that runs ftp with the commands from the text-file:
ftp -s:ftp.txt
Now all you have to do is schedule the upload.bat batch file to run on a certain time every day!
I’ve been looking for possibilities to add events to windows-folders. I found some folder-monitor programs but nothing that really worked for me. What i would like t know if it is possible to add an event to a folder. For instance, if a new file is added to this folder run upload.bat and parse the filename to it, so that the new file is automatically uploaded once its added to that folder.
In combination with for instance dircaster, this could be used by podcasters. Record your show, save it to the podcastfolder on your computer and the rest is done automatcally. That would be nice!
If anybody has any ideas about this, please let me know.