Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 ?

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.datThen, 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

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 ?

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.DATIf 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

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.

![]() |
OnBoard sound in DOS
|
What has happened to Free...
|

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