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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
digioleg54
Posts: 1
Joined: 14 Oct 2014 09:42

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

#1 Post by digioleg54 » 14 Oct 2014 09:48

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

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

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

#2 Post by Squashman » 14 Oct 2014 17:21

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.

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

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

#3 Post by ShadowThief » 14 Oct 2014 17:25

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!"

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

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

#4 Post by foxidrive » 16 Oct 2014 00:58

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. :)

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

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

#5 Post by ShadowThief » 16 Oct 2014 01:19

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.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

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

#6 Post by foxidrive » 16 Oct 2014 02:15

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".

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

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

#7 Post by ShadowThief » 16 Oct 2014 02:20

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.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

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

#8 Post by foxidrive » 16 Oct 2014 03:14

Oi! We were talking about the title! :D

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

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

#9 Post by ShadowThief » 16 Oct 2014 03:16

You mean the title "I need help to ftp file from Linux to Windows 7 using batch"?

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

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

#10 Post by ShadowThief » 16 Oct 2014 03:22

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. :?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

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

#11 Post by foxidrive » 16 Oct 2014 04:07

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.

Post Reply