Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Comments in FTP Script?

2,313 views
Skip to first unread message

Rhino

unread,
Sep 29, 2001, 7:21:58 PM9/29/01
to
I have written a simple FTP script that is using the FTP command in Win95. I
would like to add some comments but haven't found any way to do so without
also producing error messages. Can anyone enlighten me?

For instance, given the following FTP script, which is invoked via
ftp -s:ftptest.txt:
open my.server
myuserid
mypasswd
lcd c:\Windows
ls *.bat
bye

I'd like to add some comments here and there describing what I'm doing or
why I'm doing it.

I couldn't find any documentation on how to comment out a line in any MS-DOS
manual, nor could I find anything in a search of newsgroups via Google. In a
spirit of trial and error, I tried prefixing the "ls" command with various
things - *, #, REM, COMMENT - but all of these caused error messages.

Is there a way to put a comment in an FTP script? If yes, how do I do it?

Rhino
---
rhino1 AT sympatico DOT ca
---
Pembleton (to imaginary suspect): Son, you are ignorance personified!
Homicide: Life on the Street


Phil Robyn

unread,
Sep 29, 2001, 11:30:51 PM9/29/01
to
Rhino wrote:

Because FTP.EXE will pass commands to the shell (i.e., DOS) for execution
if the commands begin with an exclamation mark, you can use the following to
enter comments in your script:

! rem this is a comment

or

! :: and this is also a comment


Phil Robyn
Univ. of California, Berkeley

--

u n z i p m y a d d r e s s t o s e n d e - m a i l


0 new messages