ftp.exe won't login in batch file

January 25, 2011 at 23:50:09
Specs: Windows XP
I've only started putting together what was supposed to be a very simple batch file to log into an ftp server and download a few files, but have run into what must be a simple problem. First, here is the batch file contents:

echo open www.example.com >> C:\EXAMPLE_TEMP.TXT
echo username >> C:\EXAMPLE_TEMP.TXT
echo password >> C:\EXAMPLE_TEMP.TXT

Now my issue is that when I run this, ftp.exe finds the domain and accepts the user name, but I keep geting the '530 Login authentication failed' error. If I enter those three lines manually from ftp.exe, they work no problem; it's only when run in this batch file that there is an issue.

Can anyone tell me what the issue might be? I read on Microsoft's support site that these are the causes of the 530 error:

[quote]The Allow only anonymous connections security setting has been turned on in the Microsoft Management Console (MMC).
The username does not have the Log on locally permission in User Manager.
The username does not have the Access this computer from the network permission in User Manager.
The Domain Name was not specified together with the username (in the form of DOMAIN\username).[/quote]

I don't really know what those mean, though, or why there would be a difference between manually typing the entries into ftp.exe and having them in the batch file.

Thanks in advance for any help!

See More: ftp.exe wont login in batch file

Report •

January 26, 2011 at 00:00:55
Sorry guys, I guess all it took was asking the question in public for me to figure out the problem. So simple...I was putting spaces after each line being entered into the text file. Duh.


Report •
Related Solutions

Ask Question