Page 1 of 1

Help : FTP ftpactivedoc.bat

Posted: Wed Nov 19, 2003 2:17 pm
by DougFMR
Could someone help me set this script up correctly? I get this error:
ECHO is off.
The syntax of the command is incorrect.
Tool completed with exit code 255


Here is what I have, with minor masking :


set activeFile=%1

REM ------------------------------------
@echo

set ftpascii=Z:\ftpascii.txt
set destinationDir=/export/home/xxxx/xyz

REM Build the ftp script.
REM We don't leave a space between the value & the > symbol because that space would be sent to the file

echo open FtpServer> %155.999.999.99%
echo username>> %xxxxx%
echo password>> %xxxxx%
echo cd %destinationDir%>> %ftpascii%
echo ascii>> %ftpascii%
echo hash>> %ftpascii%
echo send %1>> %ftpascii%
echo quit %1>> %ftpascii%
REM -----------------------------------

ftp -s -d:%ftpascii%


What does ftpascii do (a pipe)?
If you can show me what you have, that should be helpful.
Thanks.

Posted: Wed Nov 19, 2003 3:35 pm
by ben_josephs
You are referring to the downloadable utility in ftp.zip, I presume.

You may be able to fix this yourself by following the instructions provided in both ftpActiveDoc.bat and readmeftp.txt.

The lines

Code: Select all

echo open FtpServer> %155.999.999.99% 
echo username>> %xxxxx% 
echo password>> %xxxxx% 
should be

Code: Select all

echo open FtpServer> %ftpascii% 
echo username>> %ftpascii% 
echo password>> %ftpascii% 
where FtpServer is your FTP server, username is your username, and password is your password.

The line

Code: Select all

ftp -s -d:%ftpascii%
should be

Code: Select all

ftp -s:%ftpascii%
Also:
You can remove the line

Code: Select all

set activeFile=%1 
And the line

Code: Select all

@echo
should be

Code: Select all

@echo off
There are no pipes in this script. ftpascii.txt is a temporary file.

FTP

Posted: Wed Nov 19, 2003 5:41 pm
by DougFMR
Thanks Very Much. It works!

Posted: Wed May 25, 2005 3:34 pm
by [XAP]Bob
http://www.textpad.info/forum/viewtopic ... hlight=ftp

An alternative, from scratch, effort having not seen the above documentation.