HP3000-L Archives

June 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Fri, 15 Jun 2001 13:30:12 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
X-no-Archive:yes
I might do something like the following, for command line ftp. I actually
also make the password a passable parm. In fact, that's half the reason I
wrote this, so I wouldn't have to hard code the password, although any
argument can be used for parms. The batch file builds it's own command file
by redirection, then deletes immediately after sending. This happens to be
borrowed and adapted from a more involved process, so there are some
artifacts that are not exactly necessary, such as the echos and exit label.

@echo off
echo user ftpuser password>%0.txt
if %1!==! echo send defaultfilename.dat DEFAULT>>%0.txt
if not %1!==! echo send %1>>%0.txt
echo quit>>%0.txt
if %1!==! Echo Uploading DEFAULT file
if not %1!==! echo Uploading %1
ftp -n -s:%0.txt HostName
del %0.txt
ECHO See you again next time!
:exit

If this approach looks interesting, feel free to ask me any questions you
might have.

Greg Stigers
http://www.cgiusa.com

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2