bcarl314
02-14-2003, 02:16 PM
I want to create a batch file that will log into a ftp server and grab some files. I want be able to pass an argument to the batch file that will tell the ftp program what files I want.
example
c:\> myBatchFile *.html
will get all the .html files from the server.
myBatchFile looks like this:
ftp -i -s:login.txt
and the file login.txt looks like:
open 127.0.0.1
username
password
cd
/usr/var/html
now where do I put in the argument I want to pass from the command line so the program will get the *.html files?
If I add a line like
mget %1 to the batch file it does nothing
same if I add it to the login.txt file.
Any ideas?
example
c:\> myBatchFile *.html
will get all the .html files from the server.
myBatchFile looks like this:
ftp -i -s:login.txt
and the file login.txt looks like:
open 127.0.0.1
username
password
cd
/usr/var/html
now where do I put in the argument I want to pass from the command line so the program will get the *.html files?
If I add a line like
mget %1 to the batch file it does nothing
same if I add it to the login.txt file.
Any ideas?