Under win xp pro sp1 I had many batches that
performed tasks like transfer, rename, delete files
It's in the intranet so I did not mind leaving password in clear in
the batch.
For example to periodically transfer a fixed file I used this
C:\> type transfer-it.bat
echo off
set TEMPNAME=.\remove_me.txt
echo user myuser >> %TEMPNAME%
echo mypassword >> %TEMPNAME%
echo cd mydir >> %TEMPNAME%
echo binary >> %TEMPNAME%
echo put myfile.ext >> %TEMPNAME%
echo bye >> %TEMPNAME%
ftp.exe -n -s:%TEMPNAME% ftp.mysite.com
del %TEMPNAME%
C:\>
after installing xp service pack 2 ftp.exe refuse to pass the password
present in the script and returning this output
C:\> transfer-it.bat
Connected to ftp.mysite.com
220 FTP Server ready.
ftp> user myuser
331 Password required for myuser .
530 Login incorrect.
Login failed.
ftp> cd mydir
530 Please login with USER and PASS
ftp> put myfile.ext
530 Please login with USER and PASS
530 Please login with USER and PASS
ftp> bye
221 Goodbye.
C:\>
I replicated the behaviour on two different workstations and I can
confirm it's caused by sp2...
Please, don't tell me that it's not a bug but it's a feature...
(btw: Windows xp firewall is disabled)
any hint? Am I supposed to abandon ftp.exe for scripting use?
I know that CURL.exe (
http://curl.haxx.se/) can also upload file... but
I would avoid modifying all my batches.
TIA!
bye,
PiErre