So I have a batch file which pipes some ftp commands into a host and I want to copy every file from my local directory with a certain extension to the host machine.
All that happens after i ftp is a directory change then
put *.ext quit
It will put the first instance of any given file that it finds on the host but ignore all subsequent instances. Anyone know why?
To copy a single file, use the put command. To copy multiple files at once, use the mput command. You can supply a series of individual file names and you can use wildcard characters. The mput command will copy each file individually, asking you for confirmation each time.
This sample service invokes the FTP put and get commands. The service reads a file and places it on the specified FTP server. The FTP get command is issued after a short pause and the file contents are written back to the local storage.
150 ASCII data connection for README (128.138. 242.10,3134) (2881 bytes).
Syntax FTP [-options] [-s:filename] [-w:buffer] [host] key -s:filename Run a text file containing FTP commands. host Host name or IP address of the remote host. -g Disable filename wildcards. -n No auto-login. -i No interactive prompts during ftp.
nevermind, I found out that 'put' will only process a single file. The command I was looking for was 'mput'!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With