Not able to upload/download files via FTP script [SOLVED] -


so have following batch file creates ftp script upload/download files server.

however running admin rights script uploading 1 file , downloading none ideas?

@echo off  echo user a6954408 >>ftpcmd.dat echo renu123 >>ftpcmd.dat  echo cd /public_html/ >>ftpcmd.dat echo bin >>ftpcmd.dat lcd c:\users\user\appdata\local\temp >>ftpcmd.dat echo auto_update.exe >>ftpcmd.dat echo log.txt >>ftpcmd.dat echo put c:\users\user\appdata\local\temp\log.txt >>ftpcmd.dat  echo put c:\users\user\appdata\local\temp\dev.txt >>ftpcmd.dat  echo quit >>ftpcmd.dat   ftp -n -s:ftpcmd.dat chatterz.net78.net    goto :run1 :run1 ftp -n -s:ftpcmd.dat chatterz.net78.net    goto run1 

update : 19-06-2015 , 16:05

thanks help, still not getting it..

connected chatterz.net78.net. 220---------- welcome pure-ftpd [privsep] ---------- 220-you user number 12 of 500 allowed. 220-local time 06:32. server port: 21. 220-this private system - no anonymous login 220 disconnected after 3 minutes of inactivity. ftp> user a6954408 331 user a6954408 ok. password required  230-ok. current restricted directory / 230-2 files used (0%) - authorized: 10000 files 230 6040 kbytes used (0%) - authorized: 1536000 kb ftp> cd public_html 250 ok. current directory /public_html ftp> bin 200 type 8-bit binary ftp> lcd c:\users\user\appdata\local\temp local directory c:\users\user\appdata\local\temp. ftp> auto_update.exe 200 port command successful 550 can't open auto_update.exe: no such file or directory ftp> log.txt 200 port command successful 150 connecting port 53985 226 file transferred ftp> put log.txt 200 port command successful 150 connecting port 53986 226 file transferred ftp> put dev.txt dev.txt: file not found ftp> quit 221-goodbye. uploaded 0 , downloaded 0 kbytes. 221 logout. press key continue . . . 

the files still not being uploaded/downloaded idea can do?

your code correct.

there 2 issues, none of cause of problems:

  • echo renu123 >>ftpcmd.dat - should not leave space after password used part of password.
  • lcd c:\users\user\appdata\local\temp >>ftpcmd.dat - missing echo before lcd.

when run code, fails download auto_update.exe file not exist on server:

ftp> auto_update.exe 200 port command successful 550 can't open auto_update.exe: no such file or directory 

both files uploaded (if have them on local machine). if not upload on machine, it's because not have them in path.

based on output log, log.txt uploaded, dev.txt not, because not exist.


so not think there with. make sure file downloading , uploading exists.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -