P
Paul H
If this is not the appropriate place for this question, please steer me
right.
I hope the following is understandable by one of you batch file Guru's.
I need to automate a process that has been running manually. It goes like
this:
1. Open a DOS window.
2. Change to the folder I want to receive the file into.
3. enter "ftp ftp.blahblahblah.com".
4. When prompted as follows, enter a User ID. The following 4 lines of text
are received, after a .2 second to maybe 10 or more second wait, then
wanting a User ID to be entered.
a) Connected to ftp.blahblahblah.com.
b) 220-Microsoft FTP Service
c) 220 WARNING: Unauthorized [snip] suspected.
c(User <ftp.blahblahblah.com:<none>>:
d) abc (I have entered the User ID "abc".
5. When prompted as follows, enter the password. The following 2 lines of
text are received after a variable length delay:
a)331 Password required for abc.
b)456xyz (I have entered the password "456xyz")
6. Cause the file to be retrieved. This will be prompted for by:
a)2130-WARNING: Unauthorized [snip] suspected.
b)230 User abc logged in.
c)ftp>
d)get MyNewFile.txt (I have entered "get MyNewFile.txt")
7. end the FTP session.
It's been quite a while since I did a DOS batch file, so I need help.
My 1st guess would be:
cd \new-in
echo off
ftp ftp.blahblahblah.com
ftp ftp.blahblah.com
wait for the prompt (somehow watching for specific text)
echo abc
wait for the prompt (somehow watching for specific text)
echo 456xyz
echo get MyNewFile.txt
echo quit
execute a local program to process the file just received.
exit
TIA, Paul
right.
I hope the following is understandable by one of you batch file Guru's.
I need to automate a process that has been running manually. It goes like
this:
1. Open a DOS window.
2. Change to the folder I want to receive the file into.
3. enter "ftp ftp.blahblahblah.com".
4. When prompted as follows, enter a User ID. The following 4 lines of text
are received, after a .2 second to maybe 10 or more second wait, then
wanting a User ID to be entered.
a) Connected to ftp.blahblahblah.com.
b) 220-Microsoft FTP Service
c) 220 WARNING: Unauthorized [snip] suspected.
c(User <ftp.blahblahblah.com:<none>>:
d) abc (I have entered the User ID "abc".
5. When prompted as follows, enter the password. The following 2 lines of
text are received after a variable length delay:
a)331 Password required for abc.
b)456xyz (I have entered the password "456xyz")
6. Cause the file to be retrieved. This will be prompted for by:
a)2130-WARNING: Unauthorized [snip] suspected.
b)230 User abc logged in.
c)ftp>
d)get MyNewFile.txt (I have entered "get MyNewFile.txt")
7. end the FTP session.
It's been quite a while since I did a DOS batch file, so I need help.
My 1st guess would be:
cd \new-in
echo off
ftp ftp.blahblahblah.com
ftp ftp.blahblah.com
wait for the prompt (somehow watching for specific text)
echo abc
wait for the prompt (somehow watching for specific text)
echo 456xyz
echo get MyNewFile.txt
echo quit
execute a local program to process the file just received.
exit
TIA, Paul