Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Possibly you could be a bit more specific?
Take a look at the options for DOS CHOICE.
What version of DOS?
If at first you don't succeed, try, try again. Then give up. There's no sense being a damn fool about it.

Well, you could've put that in your message under 'OS'.
Still pretty vague on what exactly you're trying to do.
If at first you don't succeed, try, try again. Then give up. There's no sense being a damn fool about it.

Sorry about the vague.....
We are trying to have dos machines ftp a file to the PC however the file always changes so I want the user to input the filename. So basically I was wondering if there is a way to prompt the get command?
I made a .bat file to run along with a .txt file for the answers.
ex.
this is the .batftp -s:c:\ftp.txt
this is the .txt
open x.x.x.x
myusername
mypassword
binary
lsI basically am very rusty with DOS.
So need some help

Ok, that's clearer : )
I'm not too familiar with the ftp command, but I suspect that there's a better way of batching it.
By referencing ftp.txt - that's fairly specific and won't, I don't think, allow for any flexibility.
A lot depends on the potential user - you would need to include an error handling routine in case of incorrect entries.
You could use 'replaceable parameters:
ftp -s:%1
- where %1 represents the name of the script file to be used - this presumes that the user will know which text file to input (and it's location).
This seems less than ideal - better would be prompting for user input for each variable, but I'm afraid I don't know how that would work using 'ftp'
If at first you don't succeed, try, try again. Then give up. There's no sense being a damn fool about it.

ftp [ -d ] [ -g ] [ -i ] [ -n ] [ -v ] [ HostName [ Port ] ]
Well, a lot depends on the user - I mean, you could have a series of script files and assume that the user knows which one is appropriate.
If you wanted to write error handling routines, you'd likely use if errorlevel and goto statements in the batchfile and/or the CHOICE command.
It can get more than a little complicated.
If at first you don't succeed, try, try again. Then give up. There's no sense being a damn fool about it.

It basically has to be as basic as possible the users really wouldn't know commands..I really just want them to enter the job number and download the file.

Well, that's what I'd thought. Could prove to be problematic if you're as rusty at DOS batching as you say. Might have to do a bit of research:
... maybe you can find a 'readymade' file that you could use or modify.
Check back, someone more familiar with ftp than I am may be able to provide an answer for you.
If at first you don't succeed, try, try again. Then give up. There's no sense being a damn fool about it.

Also, Secret_Doom's (aka Leonardo Pignataro) website may be of interest.
Haven't seen him around these parts lately, but he was the resident batchfile guru.
If at first you don't succeed, try, try again. Then give up. There's no sense being a damn fool about it.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |