Re: Command line FTP help

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Mon, 12 Dec 2005 04:00:02 -0800, "Jake" wrote in
microsoft.public.win2000.networking:

>OK here is the batch program:
[62 lines snipped]

I do this regularly using my preferred CLI, 4NT. Applied to your
situation, the following few lines should give you an idea how:

@ECHO OFF
SET logfile=C:\Gnupg\SecureFTP.log
LOG /W %logfile
IFF %# NE 2 THEN
ECHO You must enter 2 parameters - input and output file names.
QUIT 8
ENDIFF
gpg --armor --output %2 --recipient XXXXXXXX --encrypt %1 | TEE /A %logfile
IFF ERRORLEVEL NE 0 THEN
ECHO An error (%ERRORLEVEL) occurred whilst encrypting the file %1
QUIT 4
ENDIFF
COPY %2 "ftp://username:password@xxxxxxxxxxxxxxxxx"; | TEE /A %logfile
IFF ERRORLEVEL NE 0 THEN
ECHO An error (%ERRORLEVEL) occurred during the FTP transfer of %2
QUIT 2
ENDIFF
EXIT

4NT's transparent treatment of FTP is documented at
<http://jpsoft.com/help/ftpservers.htm>; its LOG command at
<http://jpsoft.com/help/log.htm>. 4NT is a commercial product; 4DOS is
free, but doesn't support FTP.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
.



Relevant Pages

  • FTP question
    ... enter "ftp ftp.blahblahblah.com". ... abc (I have entered the User ID "abc". ... echo off ... wait for the prompt ...
    (microsoft.public.windows.vista.general)
  • Re: "Process terminated by SIGINT"?
    ... When searching from the command line, I handle the documentation volume ... elseiff exist %X*.inf then ... echo Nothing selected for %$ ...
    (comp.os.os2.programmer.misc)
  • AIX FTP question
    ... We have AIX 5.2 & I am trying to get a file from a server using ftp. ... echo user $USERID $PASSWORD ... 150 Opening ASCII mode data connection for. ... Passive mode on. ...
    (comp.unix.shell)
  • AIX FTP question.
    ... We have AIX 5.2 & I am trying to get a file from a server using ftp. ... echo user $USERID $PASSWORD ... 150 Opening ASCII mode data connection for. ... Passive mode on. ...
    (comp.unix.shell)
  • FTP question...
    ... enter "ftp ftp.blahblahblah.com". ... abc (I have entered the User ID "abc". ... echo off ... wait for the prompt ...
    (microsoft.public.windowsxp.general)