Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,221 of 68,980    |
|    probyn@berkeley.edu to conn...@bc.edu    |
|    Re: Find a file name based on a variable    |
|    17 May 18 10:14:10    |
      On Thursday, May 17, 2018 at 7:39:18 AM UTC-7, conn...@bc.edu wrote:       > Is there a way (and what does it look like) to find a file in a specified       folder that contains a variable the user enters?       >       > something along the lines of       >       > set /p V1=Please enter the unit number you want to find the file for as a       two digit number (02, 23, etc)       > echo       > echo       > if not exist "%V1%*" echo No Order File Found!!!!       > @timeout /t 2 /nobreak >nul       > if not exist "%V1%*" goto END       > Schtaskst /Run blah blah blah       > :END              When you say 'a file ... that contains a variable', did you mean that       the NAME of the file contains the variable, or did you mean that the       variable is to be looked for within the CONTENT of said file?              At the time when the user enters the variable, is the file that we're       looking for (either searching its name or its content) in the current       directory or somewhere else?              --       Phil Robyn              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca