ftp usage in batch command?

  • Thread starter Thread starter Mira
  • Start date Start date
M

Mira

Hello,

How to do file transfer from SERVER-A to SERVER-B using a
ftp command? This I need to put into a scheduled batch
process. Also, what are the advantages of ftp transfer
over conventional copy such as "copy D:\*.txt M:\dir1
\dir2\*.txt" (Where M is network mapped drive).

Thanks.
 
Mira said:
Hello,

How to do file transfer from SERVER-A to SERVER-B using a
ftp command? This I need to put into a scheduled batch
process. Also, what are the advantages of ftp transfer
over conventional copy such as "copy D:\*.txt M:\dir1
\dir2\*.txt" (Where M is network mapped drive).

If you are talking about the proxy command then Microsoft ftp servers don't
support that.

If you are talking about running a btach ftp from say serverA to another
then you do it this way:
ftp serverB -s:script.txt
Where script .txt contains the list of commands for the ftp client to
follow. For example:
myusername
mypass
lcd C:\somedir
cd /pub/users/somedir
bin
prompt
mput *.jpg
close
quit

I don't think there is an advantage of ftp vs. shares, except when shares
are not allowed.
 
In said:
If you are talking about the proxy command then Microsoft ftp
servers don't support that.

If you are talking about running a btach ftp from say serverA to
another then you do it this way:
ftp serverB -s:script.txt
Where script .txt contains the list of commands for the ftp client
to follow. For example:
myusername
mypass
lcd C:\somedir
cd /pub/users/somedir
bin
prompt
mput *.jpg
close
quit

I don't think there is an advantage of ftp vs. shares, except when
shares are not allowed.

There might be dis-advantages (or at least more work) to running a
FTP server...
 
Ha..Ha..Ha..... Thanks to both of you.

Actullay, one of my customer is not happy that I am using
NetBIOS copy (copy over shared folders). He advises me to
use ftp instead as it is more secured! I could not bite
it. So I have put this query here...

Mira.
 
Mira said:
Ha..Ha..Ha..... Thanks to both of you.

Actullay, one of my customer is not happy that I am using NetBIOS copy
(copy over shared folders). He advises me to use ftp instead as it is
more secured! I could not bite it. So I have put this query here...

At one company we had a sister site in Shanghai, China whereas our main
site was in Santa Clara, California. I would build our product and
naturally the Chinese engineers would want a copy locally. So I would
push the copy over to Shanghai using copy over SMB. As our product
images grew this became a problem as it was taking upwards of 45 minutes
to put the now growing 40-60 meg compressed zip files.

So I switched to FTP. Result? The now 60+ meg zip files transfered in 5
minutes! Lesson: SMB has lots of overhead!

You can look into things like ncftp and there are also secure ftp
clients/servers. You'll have to look outside of Microsloft though!
(horrors!)
 
Back
Top