I am trying to write a batch file that will Upload and update a specific set of file on my desktop to an FTP account, so I wrote this batch:
@ftp -i -s:"%~f0"&GOTO:EOF
open DomainName.com
USERNAME
PASSWORD
binary
cd httpdocs/myfiles
lcd F:\Test\Folder1
mput *.bmp
close
quit
by testing the above batch, everything work good until it reaches the line:
mput *.bmp
once this line is reached, connection freeze and the only way to resume after that is by restarting the router
So can someone please help me by telling me what exactly I am doing wrong here?
Update: 1. FTP server I am trying to upload to is Linux based (CentOS) 2. I am using a Windows XP - SP1 machine to execute this batch file 3. I've tried clicking CTRL+C to terminate the batch but still, even though the batch is terminated the connection remain freezed until I restart the router
Update 2: Here is the exact output of the commands I enter:
ftp
open domainname.com
220 ProFTPD 1.3.4a Server <ProFTPD> [IP ADDRESS of our server]
User <domainname.com:<none>>: USERNAME
331 Password required for USERNAME
Password: PASSWORD
230 User USERNAME logged in
ftp> binary
200 Type set to I
ftp> cd httpdocs/myfiles
250 CWD command successful
ftp> lcd F:\Test\Folder1
Local directory now F:\Test\Folder1
ftp> mkdir MyTest1
257 "/httpdocs/myfiles/MyTest1" - Directory successfully created
ftp> put test.bmp
Freeze connection and router
dir
after thecd
. Try replacing themput *.bmp
withput foo.bmp
. And — am I missing something? Are you FTPing into a router, or into some ordinary computer? It might help if you told us what your FTP server is. (And have you tried hittingCtrl+C
when your connection freezes?) (Also, can you sniff the network traffic?)