Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 40,974 of 42,547    |
|    Todd to foxidrive    |
|    Re: How do I find drive letter for a dri    |
|    06 Aug 14 16:17:06    |
      From: Todd@invalid.invalid              On 08/06/2014 04:29 AM, foxidrive wrote:       > @echo off       > set "driveletter="       > for %%a in (d e f g h i j k l m n o p q r s t u v w x y z) do (       > if exist %%a:\ vol %%a: |find /i "MyBackup" >nul && set driveletter=%%a       > )                            Awesome! Thank you all!              -T              This is what I eventually came up with:                     @echo off              set DriveLabel=GRTMPOEM_EN              for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (        if exist %%a:\nul (vol %%a: |find /i "%DriveLabel%" >nul && set       driveletter=%%a && goto :LoopExit)       )              :LoopExit              echo.       echo DriveLabel %DriveLabel% DriveLetter %DriveLetter%              --- 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