Your Ad Here

Posted By

erniedobson on 03/04/10


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Tyster
thastyle


list drives letters or volume details


 / Published in: DOS Batch
 

URL: http://www.maycroft.net/index2.htm

  1. @echo off
  2. rem Vol information is displayed if called with an argument, otherwise the drive letters are displayed
  3. set INFO=%1
  4.  
  5. call :Drive 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
  6. set INFO=
  7. goto :EOF
  8.  
  9. :Drive
  10. vol %1: > nul 2>nul
  11.  
  12. if not "X"%INFO%=="X" (vol %1:) else echo %1:
  13. :Next
  14. if NOT "X"%1=="X" goto :Drive

Report this snippet  

You need to login to post a comment.