Solved

NEWBIE: How to script an FTP transfer?

Posted on 2006-06-29
5
515 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XML problem with Internet Explorer 7 45
Owl Carousel 6 201
CSS (line height?) issue 2 64
Does a Google search find images with the word being searched? 11 71
Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

813 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

11 Experts available now in Live!

Get 1:1 Help Now