by Steve MacLellan » Sat Feb 25, 2006 6:27 am
On another note, if you don't have Excel web-enabled, you could provide your boss with a little bat program that he could double-click on and immediately have the flatfile downloaded to his desktop. Again, this could be automated using Windows scheduler too, if you wanted to.
You wouldn't need any special programs to do this. Even without having or knowing how to use an FTP program, all computers understand the FTP protocol.
As soon as a batch file initiates an FTP connection, your computer is running in that shell and no longer working out of the batch file. So the way to do it is to include another file into the batch file that contains all of your FTP commands. Then once this script is completed you're back to the batch file to complete any other tasks contained within it.
Sound confusing? It will be easier to explain by showing you the files:
So, here is the contents of my batch file called "2bat.bat"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO OFF
FTP -s:login.txt your_domain.com
CSL
EXIT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
when this batch file is run it calls the login.txt which contains
my username, password, and other FTP commands. Here is the
contents of login.txt:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
username
password
cd www/cgi-bin
get flatfile.txt
bye
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Then everytime he wanted the flatfile, he would double-click the icon on his desktop and provided he was connected to the Internet, the flatfile would be automatically downloaded onto his desktop.
Best Regards,
Steve MacLellan