Member_2_1242703
asked on
How do I transfer all files from a local directory to a web server directory via FTP / command line?
I want to create a batch file that will move all files on my local PC to a folder on my web server using FTP with no prompts. How do I do this? Both systems are windows based.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what version of windows?
I have windows 7 and ftp works from command prompt (cmd).
prompt is and ftp client command to disable / enable confirmation when transferring multiple files.
bin is an ftp client command to set file type to binary
cd is an ftp client command to change dir on the remote system
mput is an ftp client to send multiple files to remote system (or you could use put for single file, or mget to get multiple files from remote system).
bye is an ftp client command to exit ftp client.
I have windows 7 and ftp works from command prompt (cmd).
prompt is and ftp client command to disable / enable confirmation when transferring multiple files.
bin is an ftp client command to set file type to binary
cd is an ftp client command to change dir on the remote system
mput is an ftp client to send multiple files to remote system (or you could use put for single file, or mget to get multiple files from remote system).
bye is an ftp client command to exit ftp client.
ASKER
ok I got it to work. I guess there is an environment variable screwed up or something. anyhow...here is myphp.txt
myUser
myPass
prompt
bin
cd /secure/projectfiles
mput C:\Stuff\FTPtest\files\*.*
bye
then I ran this command:
ftp.exe -n -s:C:\Stuff\FTPtest\myftp.txt ftp.mydomain.com
and received the following:
myUser
myPass
prompt
bin
cd /secure/projectfiles
mput C:\Stuff\FTPtest\files\*.*
bye
then I ran this command:
ftp.exe -n -s:C:\Stuff\FTPtest\myftp.txt ftp.mydomain.com
and received the following:
ok, runt the ftp without -n
ASKER
That did it. Thanks!
welcome
ASKER
prompt
bin
cd /remotedir
mput *.*
bye
Where do I run that command? I tried from a command prompt and it told me ftp was not a recognized command.