Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ftp Put *.ext only transfers the first file

Tags:

put

wildcard

ftp

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?

like image 681
Josh Bibb Avatar asked Oct 09 '12 20:10

Josh Bibb


People also ask

What is the purpose of put command in FTP?

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.

What is put and get in FTP?

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.

How many ascii characters FTP commands?

150 ASCII data connection for README (128.138. 242.10,3134) (2881 bytes).

What is FTP command syntax?

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.


1 Answers

nevermind, I found out that 'put' will only process a single file. The command I was looking for was 'mput'!

like image 123
Josh Bibb Avatar answered Sep 28 '22 06:09

Josh Bibb