ftp usage in batch command?

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.
 
P

Paul R. Sadowski

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.
 
M

Mark V

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...
 
M

Mira

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.
 
A

Andrew DeFaria

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!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top