General discussion

Locked

FTP

By chris.nwankwo ·
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

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

FTP

by gesquiere.k In reply to FTP

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.

Collapse -

FTP

by chris.nwankwo In reply to FTP

The question was auto-closed by TechRepublic

Collapse -

FTP

by James_Randy In reply to FTP

The first answer looks good to me. If that doesn't work, try something else. Hope this helps.

Collapse -

FTP

by chris.nwankwo In reply to FTP

The question was auto-closed by TechRepublic

Collapse -

FTP

by chris.nwankwo In reply to FTP

This question was auto closed due to inactivity

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums