home bbs files messages ]

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,553 of 68,980   
   Peter to All   
   How to Test Whether a Drive Exists   
   05 Jun 20 19:04:34   
   
   From: pmokover@gmail.com   
      
   How can I test in a batch file whether an external USB drive does not exist   
   because: 1) it’s not currently connected to the PC or 2) it is connected but   
   it’s locked by a program such as BitLocker (in Windows 10)?   
      
   If I use the usual “if not exist d:” line it will say the drive does not   
   exist in either case above.  How can I distinguish between 1) the drive is not   
   connected or 2) the drive is connected but it’s locked?   
      
   FYI, when a drive is locked by Bitlocker it will still be listed in Windows   
   Explorer however “if exist” will say that it does not exist.   
      
   --- 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