[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

FTP batch file

Posted on 2009-02-09
1
Medium Priority
?
343 Views
Last Modified: 2012-05-06
how do I write a batch file using the command line FTP built into Windows to download the readme file from ftp://ftp.leadtools.com/readme.txt
0
Comment
Question by:captgriggs
1 Comment
 
LVL 1

Accepted Solution

by:
NVHelpdesk earned 2000 total points
ID: 23592903
Hello,

You'll need to create two files, one the batch file, and the other a text file with the list of commands to execute once you start the ftp program.

the batch file that actually calls the ftp program will look something like this (Items within <> are variables, and should be changed for your application, and the <> removed)-

@echo off
ftp -s:<TextFileWithCommands> <AddressOfFtpServer>
exit

And the <TextFileWithCommands> file will look something like this
<ftp site username>
<ftp site password>
<commands>
quit

So for your example, your batch file will look like this -

@echo off
ftp -s:getreadme.txt ftp.leadtools.com
exit

and the getreadme.txt file will look like this -

<ftp username>
<ftp password>
get readme.txt
quit

Hope that makes sense.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Screencast - Getting to Know the Pipeline

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question