Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 769
  • Last Modified:

Batch File to download all files from remote server using

I need a batch file that I can call to download all files from a remote server using ftp. I need to supply a username and password...download all files to the directory: C:\Data.  Can anyone assist?
0
OB1Canobie
Asked:
OB1Canobie
  • 2
1 Solution
 
Steve KnightIT ConsultancyCommented:
Are all these files in one directory?  If so you can use MGET with the standard FTP client otherwise it will get very messy.

@echo off
(echo open 110.110.110.110
echo user username password
echo lcd c:\destdir
echo cd /source/path
echo bin
echo mget *.*
echo quit
) | ftp -n -i

where all files from /source/path on the server 110.110.110.110 will be brought to C:\destdir

Scripting with ftp.exe you can do in a number of ways.  The above is my favoured when the script is static but I have some more examples here:

http://scripts.dragon-it.co.uk/links/batch-ftp-scripting?OpenDocument

Steve
0
 
OB1CanobieAuthor Commented:
Excellent!
0
 
Steve KnightIT ConsultancyCommented:
No problem, glad it helped.

Steve
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now