sandramac
asked on
FTP batch file
Hello all, needing some help, trying to create a bat file to upload all .htm file in my directory C:/users/data to my /public_html directory on my website. Would appreciate any help to get this done.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I like using FTP without any extra command files, so the above would then look like:
@echo off
(echo open mysite.com
echo username
echo password
echo !:--- FTP commands below here ---
echo lcd C:/users/data
echo cd public_html/
echo binary
echo mput "*.htm"
echo disconnect
echo bye
) | ftp -v -i
There methods for not needing to use echo, but they make the script more difficult to understand.
A great free utility that can do this is NCFTPPUT, take a look, it can do this all with a single line in a BAT file.
http://www.ncftp.com/ncftp/
~bp
http://www.ncftp.com/ncftp/
~bp
It looks like you used forward slashes for you local folder.
Here is how you do it with Robo-FTP:
Open in new window