Ftp login and download in batchfile in Windows 7

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sailare
Posts: 1
Joined: 17 Sep 2011 09:24

Ftp login and download in batchfile in Windows 7

#1 Post by sailare » 17 Sep 2011 09:37

Hello,

Firstly i would like to thank the creator of this website as my problem was solved by the cript that was provided on the website.

Now to the problem i am facing. This script works perfectly on my Windows XP SP3 but fails to download a file in Windows 7.
I have an ftp server from which i would be downloading a file daily, namely "rainbo.exe" .
I download the script called "FTP - Automatic Login - Automatically login to your FTP session with a single click" and modified it to also switch to binary mode and download the file, "rainbo.exe" .

The following is the command in the batch:[ with username and password not shown :) ]
@ftp -i -s:"%~f0"&GOTO:EOF
open ftp.*hidden*.com
<Username>*hidden*
<password>*hidden*
binary
get rainbo.exe

Please help me as this script is working flawlessly in windows Xp SP3 but fails to download the file, it just makes a temp file and not download or show any error in windows 7.

Thank you in advance

djangofan
Posts: 23
Joined: 04 Nov 2011 12:28

Re: Ftp login and download in batchfile in Windows 7

#2 Post by djangofan » 04 Nov 2011 13:48

Can you try something like this? Not sure if this would work, but here it is:

Code: Select all

@ftp -i -s:"%~f0"&GOTO:EOF
open ftp.domain.com
username
password
bin
get rainbo.exe
disconnect
bye

jumpingjack
Posts: 2
Joined: 04 Nov 2011 17:26

Re: Ftp login and download in batchfile in Windows 7

#3 Post by jumpingjack » 04 Nov 2011 17:48

> FTP.do ECHO o site
>> FTP.do ECHO username
>> FTP.do ECHO password
>> FTP.do ECHO get file
>> FTP.do ECHO bye


This is what I'm using right now
the o is not a typo =P

Post Reply