I can\'t succeed to upload a multiple files to some FTP by batch file I made.
Also, I want to upload all files from this local directory.
The code:>
FTP command allows sending multiple files but if we want directories and sub-directories auto created and transferred then alternatively, we can use ncftp. Steps below:
Syntax:
ncftpput -u username -p password -m -R SERVER_IP_ADDRESS /remote_directory local_directory\*
Example:
ncftpput -u ftpuser1 -p ftppass1 -m -R 192.168.1.10 /var/www C:\public_html\*
The switches used are:
-u: FTP username
-p: FTP password
-m: Attempt to make the remote destination directory before copying.
-R: Recursive mode; copy whole directory trees