Batch to get file thru FTP

Hello ,
 i was have windows 2000 windows batch and its worked file after i upgrade the system from 2000 to XP i have problem with this batch , now my problem is ,

when i run the batch from XP and put wrong password the batch create the file in my local disk even the password wrong , but it 2000 it give me the password wrong

see the attahced batch and whats the problem with it

i have 3 file

1- get.ftp
2-get.bat
3-get.out


GET.FTP Attahced
GET.BAT Below

echo del C:\FTP\get.out
echo cd c:\ftp
ftp -v -n < c:\ftp\get.ftp > C:\FTP\get.out
exit




o 192.168.1.1
USER user1
PASSWORD 
ascii
lcd C:\FTP
cd \user1\file
get FILE4 file.txt
delete FILE4
delete file4back
quit

Open in new window

LVL 1
palddlAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DonConsolioCommented:
> ftp -v -n < c:\ftp\get.ftp > C:\FTP\get.out

try this:
ftp -v -n -s:c:\ftp\get.ftp > C:\FTP\get.out
0
palddlAuthor Commented:
not working any other solution ?
0
Bill PrewCommented:
What shows up in the get.out file?

~bp
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

t0t0Commented:
Try this (change the username and password to your own):



@ECHO OFF
(
   ECHO username
   ECHO password
   ECHO ASCII
   ECHO LCD c:\ftp
   ECHO CD \user1\file
   ECHO GET file4
   ECHO DELETE file4
   ECHO GET file.txt
   ECHO DELETE file4back
   ECHO BYE
)>script.txt

FTP -s:script.txt 192.168.1.1




NOTE: Is this correct:

   ECHO GET file.txt
   ECHO DELETE file4back

or did you mean:

   ECHO GET file.txt
   ECHO DELETE file.txt

or even:

   ECHO GET file4back
   ECHO DELETE file4back
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
palddlAuthor Commented:
no solution was fix this problem
0
Bill PrewCommented:
I'm still waiting for your reply to my earlier question of:

==> What shows up in the get.out file?

~bp
0
palddlAuthor Commented:
invalid user name and password , also it creatre the file.txt
0
Bill PrewCommented:
Could you post the full contents of the get.out file please.

~bp
0
Bill PrewCommented:
Would have liked to help further, but my request for a post of the log file was not responded to.

~bp
0
t0t0Commented:

>>"invalid user name and password , also it creatre the file.txt"

have you checked the username and password are correct? try them by manually logging onto the remote server.

i can't see anything in any of the code above that causes the creation of the 'file.txt' - apart from a successful download of course.

please be more responsive to questions. both billprew and i have asked you to confirm something or another and you have failed to do so.
0
t0t0Commented:
furthermore, i have every reason to believe the structure of my code in comment ID 28871886 would work 100%. please confirm.
0
palddlAuthor Commented:
Hello,

the t0t0 solution doesnt help me , still i have this problem and didnt get full solution.
0
t0t0Commented:
I am  quite happy to assist you further.

At the end of the day, you have brought a question to EE which is not resolved.

I ask you to cooperate by responding if or when asked to do so.

0
palddlAuthor Commented:
the problem i cant test this until have the same procedure , i do it once amonth , so we should wait , also i want to remove the block that i got it from you ,.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.