Solved

NEWBIE: How to script an FTP transfer?

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
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…
Suggested Courses

623 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