Computing.Net > Forums > Disk Operating System > DOS FTP-batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS FTP-batch

Reply to Message Icon

Name: Wever
Date: June 25, 2002 at 07:20:49 Pacific
Comment:

Hi All,

I wanna make a batch that automatically logson to a server, gets some files and quits. I wanna start it by doubleclicking an icon at my desktop.Is that possible ?



Sponsored Link
Ads by Google

Response Number 1
Name: Secret_Doom
Date: June 25, 2002 at 10:03:01 Pacific
Reply:

Yep, that's possible. Let's suppose the FTP commands you would type for doing that are:

open ftp.server.com
USER username
password
get file1.dat
get file2.dat

Then, the batch file would be:

@echo off
echo open ftp.server.com> SCRIPT.DAT
echo USER username>> SCRIPT.DAT
echo password>> SCRIPT.DAT
echo get file1.dat>> SCRIPT.DAT
echo get file2.dat>> SCRIPT.DAT
FTP -n -s:SCRIPT.DAT
del SCRIPT.DAT

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 2
Name: Wever
Date: June 26, 2002 at 01:50:44 Pacific
Reply:

Tnxieee, nice to see u again...

But i don't get the last line: del SCRIPT.DAT
Why would i do that ?
The batch is supposed to work with 1 file i have to get from an ftp-site. Each week the same file.

Can i put a QUIT at the end ?



0

Response Number 3
Name: Secret_Doom
Date: June 26, 2002 at 15:00:21 Pacific
Reply:

Hi, Wever.

The way the batch is, it won't need any other files to run, nor will leave any files behind. But you could also leave the script file saved and use it ny the batch file.

=== SCRIPT.DAT ===
open ftp.server.com
USER username
password
get file1.dat
get file2.dat

=== BATCH FILE ===
FTP -n -s:SCRIPT.DAT

If you use that method, the process will obviously fail if SCRIPT.DAT isn't there.

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 4
Name: David Steven
Date: July 3, 2002 at 11:38:28 Pacific
Reply:

Another reason to have the bat file create the ftp script every time:

Your ftp script is probably going to have your password in it. So having the batch file create the script keeps the password only slightly more hidden. You could also use one of those BAT file compilers and compile the bat making it a little more hard to find.

Mind you, its not that hard for anyone that know's what they're doing. But you just make it a little more inconvient.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


OnBoard sound in DOS What has happened to Free...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: DOS FTP-batch

Need help in DOS ftp www.computing.net/answers/dos/need-help-in-dos-ftp-/2085.html

Dos Batch file for Dos FTP www.computing.net/answers/dos/dos-batch-file-for-dos-ftp/423.html

DOS FTP TCP Port www.computing.net/answers/dos/dos-ftp-tcp-port/10400.html