Page 1 of 1

I need help to ftp file from Linux to Windows 7 using batch

Posted: 14 Oct 2014 09:48
by digioleg54
Folks,
I am new in batch.

I am on WINDOWS 7 and using batch script trying to ftp file from Linux to WINODWS.
BElow is my batch script:
open MYLINUXIP
MYUSER
MYPASSWORD
hash
cd /home/mktftp/upload/coverimages
asc
get DONE.SVRIMG.14102014
quit
exit /b

However, access denied:

ftp> Connected to 10.160.2.52.

open MYLINUXIP
220 MYLINUXIP FTP server ready
User (MYLINUXIP :(none)):
331 Password required for user

530 Access was denied.

Does anybody know the correct syntax or where I made a mistake?
IS it possible to make this action at all?

Thanks,
Oleg

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 14 Oct 2014 17:21
by Squashman
If you are going from LINUX to WINDOWS then you would need to execute a Shell Script on the Linux server. We don't do Linux shell scripts on this forum.

If you want help pulling a file down from the Linux server to the Windows computer then we could help write a batch file.

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 14 Oct 2014 17:25
by ShadowThief
Squashman wrote:If you are going from LINUX to WINDOWS then you would need to execute a Shell Script on the Linux server. We don't do Linux shell scripts on this forum.

If you want help pulling a file down from the Linux server to the Windows computer then we could help write a batch file.

The FTP site is on a Linux machine. He's calling this from a Windows 7 box.

Based on that error, I'd say that the user you entered doesn't have permission to access the host. If you had given an invalid user or incorrect password, the error would be "530 Login or password incorrect!"

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 16 Oct 2014 00:58
by foxidrive
ShadowThief wrote:The FTP site is on a Linux machine. He's calling this from a Windows 7 box.


It looks like that is true, but the thread subject says otherwise. :)

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 16 Oct 2014 01:19
by ShadowThief
foxidrive wrote:
ShadowThief wrote:The FTP site is on a Linux machine. He's calling this from a Windows 7 box.


It looks like that is true, but the thread subject says otherwise. :)

I don't see how; the title is asking about using a batch script to ftp a file from a Linux FTP server to a Windows 7 client.

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 16 Oct 2014 02:15
by foxidrive
ShadowThief wrote:I don't see how; the title is asking about using a batch script to ftp a file from a Linux FTP server to a Windows 7 client.


He's not FTPing a file from Linux though, and it doesn't say "FTP server".

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 16 Oct 2014 02:20
by ShadowThief
digioleg54 wrote:I am on WINDOWS 7 and using batch script trying to ftp file from Linux to WINODWS.

gives a very strong argument for the system that the user is FTPing to to have a Linux operating system.

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 16 Oct 2014 03:14
by foxidrive
Oi! We were talking about the title! :D

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 16 Oct 2014 03:16
by ShadowThief
You mean the title "I need help to ftp file from Linux to Windows 7 using batch"?

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 16 Oct 2014 03:22
by ShadowThief
OH! I see where the confusion is from now. You're reading it as a script on the Linux host sending the file to Windows and I'm reading it as a script on the Windows host taking the file from Linux.

Man, that's subtle. :?

Re: I need help to ftp file from Linux to Windows 7 using ba

Posted: 16 Oct 2014 04:07
by foxidrive
ShadowThief wrote:Man, that's subtle. :?


Yeah, the fact that is says batch does give a windows flavour to it, but the title was a bit misleading.