Anyone can tell me how to write a simple script in DOS .bat or .cmd file to achive this task: get a file from a location on NT server, then ftp it to a unix machine? I don't know how to write DOS scripts. Please help. Thanks!
Printable View
Anyone can tell me how to write a simple script in DOS .bat or .cmd file to achive this task: get a file from a location on NT server, then ftp it to a unix machine? I don't know how to write DOS scripts. Please help. Thanks!
You can write ftp command in a text file like my.ftp include following:
verbose
open your-nt-host-name
user your-login-name your-password
ascii
cd file-directory
get file-name
close
open your-unix-host-name
user your-login-name your-password
ascii
cd destination-directory
put file-name
bye
then you can create a bat file include:
ftp -n -s:my.ftp
[Edited by tangqiang on 03-21-2001 at 01:34 AM]
Thanks! It works.