Reputation: 1527
@echo off
echo user abc> ftpcmd.dat
echo xxxx>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo cd /www/ping_vm/>> ftpcmd.dat
echo lcd C:\PING_VM>> ftpcmd.dat
echo put vm.txt>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.abcxxx.com
del ftpcmd.dat
pause
On windows seven, this works fine. When I try this on XP, I get this:
230-User bizbetti has group access to: users
230 OK. Current restricted directory is /
ftp> bin
200 TYPE is now 8-bit binary
ftp> cd /www/ping_vm/
250 OK. Current directory is /www/ping_vm
ftp> lcd C:\PING_VM
Dossier local maintenant C:\PING_VM.
ftp> put vm.txt
vm.txt: Fichier introuvable
ftp> quit
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
I don't understand why the file is not uploaded at all on the XP pc.
Do you have any ideas, thanks.
Upvotes: 0
Views: 46
Reputation: 41234
The FTP PUT
command doesn't support a path as far as I know.
You normally use the LCD
command to change the local working directory and then use the filename alone.
You are also using unix separators instead of Windows as in C:\PING_VM\vm.txt
Upvotes: 1