Solved

NEWBIE: How to script an FTP transfer?

Posted on 2006-06-29
5
520 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

752 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