Solved

NEWBIE: How to script an FTP transfer?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Auto Complete Using JQuery 5 74
xml attribute DTD attribute differences 3 65
Web Development Tools for MVC 3 75
CSS display:none AND display:block on same element 3 78
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 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

15 Experts available now in Live!

Get 1:1 Help Now