Solved

NEWBIE: How to script an FTP transfer?

Posted on 2006-06-29
5
513 Views
Last Modified: 2010-04-06
Dear Experts,

I'm a total dummy about this...

I'm FTP'ing the same file by hand, repeatedly, by doing this:

Go to DOS
type  FTP MyRemoteBox
(ftp starts...)
type  MyUserID
type  MyPassword
type  cd MyDirectory
type  cd MySubDirectory
type  get MyFile

Is there any way to automate all that, like in a batch file?  I can't see how to script it so that FTP itself receives MyUserID, etc., instead of DOS trying to execute it...

(Sorry to ask such a stupid question!)

Thanks,
BrianMc1958
0
Comment
Question by:BrianMc1958
  • 4
5 Comments
 
LVL 30

Expert Comment

by:callrs
ID: 17011938
Interested in a GUI solution?
http://filezilla.sourceforge.net/  (I've used this one)
http://www.smartftp.com/
0
 
LVL 30

Expert Comment

by:callrs
ID: 17011955
http://www.computerhope.com/software/ftp.htm may help
I'm checking it out now
0
 
LVL 30

Accepted Solution

by:
callrs earned 500 total points
ID: 17011988
From the above link comes the answer:

How to create a Windows FTP script

Create a text document with commands used when in FTP.  Below is an example of what such a script may look like:

open ftp.domain.com
username
password
cd public_html
dir
get file.txt
bye

The above script will log into the ftp site ftp.domain.com. Once connected, it will enter the username and then the password (substitute username for your username and password for your password). Once logged in, the script then goes into the public_html directory, gets a directory listing and then uses the get command to get the file called file.txt. Once the file is received, it logs off using the bye command.

Once the script file has been created, for example, if it was called script.txt, to execute this script with ftp you would type:

ftp -s:script.txt
0
 

Author Comment

by:BrianMc1958
ID: 17012269
As is so often the case, I'm stunned and amazed to get such excellent help, so quickly, on Experts Exchange.

I downloaded FileZilla, and it looks great, but due to the quirkiness of my server, I can't use it.

Your scripting advice worked perfectly though--first time--even though it was typed in by a complete idiot!

Thanks a million!
--BrianMc1958
0
 
LVL 30

Expert Comment

by:callrs
ID: 17012315
: )

Try the other ftp client. Google for: ftp freeware

Two good commercial ones I've used are WS-FTP and  http://www.flashfxp.com/
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to dynamically set the form action using jQuery.

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now