🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.msdos.programmer
4 messages
4 total messages Started by L28BC Tue, 07 Apr 1992 02:30
tricky batch - help
#128
Author: L28BC
Date: Tue, 07 Apr 1992 02:30
8 lines
790 bytes
I am trying to find a way to prompt a user to enter a filename.  The computer
will then search for an existing filename and insert the filename and path
into a variable.  Does anyone know or have an idea how to search for the files
and insert their filename and path into a varialbe, if they exist or not ?


                                              Thanks in advance
                                                 - Jack -
Re: tricky batch - help
#130
Author: THIS SPACE FOR RENT
Date: Tue, 07 Apr 1992 18:09
12 lines
1014 bytes
In article <92097.223002L28BC@CUNYVM.BITNET>, L28BC@CUNYVM.BITNET writes...
>I am trying to find a way to prompt a user to enter a filename.  The computer
>will then search for an existing filename and insert the filename and path
>into a variable.  Does anyone know or have an idea how to search for the files
>and insert their filename and path into a varialbe, if they exist or not ?

Best way I can figure would be to write a small program/utility to do just
that, then wrap a batch file around it.  Shouldn't be too hard to write...


Cheers,
John
Re: tricky batch - help
#133
Author: Timothy D. Goss
Date: Wed, 08 Apr 1992 02:26
15 lines
1476 bytes
A tricky way to do it would be to write a small subroutine using only commands
built in to the DOS batch file language (and a good getkey program) which
would build the file name in an environment variable.  It wouldn't be too hard.
If anyone wants such a beast I could probably do it.  The suggestion offered
about writing a program is not within everyone's reach but is also doable if
anyone is interested...

 +----------------------------------------------------------------------------+
 |         _   /|                                                             |
 |         \'o.O'	    We the unwilling, led by the unknowning,          |
 |         =(___)=          are doing the impossible for the ungrateful.      |
 |            U             We have done so much, for so long, with so little |
 |     Timothy D. Goss      we are now qualified to do anything with nothing. |
 | goss@micor.ocunix.on.ca                                                    |
 +----------------------------------------------------------------------------+
Re: tricky batch - help
#148
Author: Robert Schmidt
Date: Sat, 11 Apr 1992 10:37
22 lines
1513 bytes
In article <92097.223002L28BC@CUNYVM.BITNET>, <L28BC@CUNYVM.BITNET> writes:
 > I am trying to find a way to prompt a user to enter a filename.  The computer
 > will then search for an existing filename and insert the filename and path
 > into a variable.  Does anyone know or have an idea how to search for the files
 > and insert their filename and path into a varialbe, if they exist or not ?
 > 
 > 
 >                                               Thanks in advance
 >                                                  - Jack -

You might try a combo of FOR %%file IN (%requestedfile) DO ....
and IF EXIST %requestedfile...  but as the details weren't very clear,
I can't give you more than this...

If you used 4DOS, a thing like that ought to be a breeze...

-- 
Regards from Robert Schmidt, PC C/asm is my game, fast graphics is my 
pain  -  Watch for my VGA/SB demo!
     e-mail to robert@solan.unit.no
 snail-mail to Stud.techn. Robert Schmidt, stud.post 170,
               Norwegian Institute of Technology, Trondheim, NORWAY
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads