FTP
Can anyone send me a sample ftp script for copying files from one server to another based on ip address.
An ftp home directory has already been created on the destination server
Windows Forum
Can anyone send me a sample ftp script for copying files from one server to another based on ip address.
An ftp home directory has already been created on the destination server
by gesquiere.k
I'm not quite sure what you're looking for when you're talking about ip addresses, but this is a script that creates a command file which you can then execute with ftp on NT. This copies all files in directory files to the FTP directory (/homdir) ofserver 194.xxx.xxx.xxx. But because file-exist errors are fatal I also deleted the files on the FTP first.
echo user username password > goftp.txt
echo cd /homdir >> goftp.txt
for %%i in (files\*.*) do @echo del %%i >> goftp.txt
for %%i in (files\*.*) do @echo put %%i >> goftp.txt
echo bye >> goftp.txt
type goftp.txt | ftp -n 194.xxx.xxx.xxx
Hope this will help,
Kurt.
by james_randy
This discussion is closed to new replies.
Sort by Trending