

But the command fsutil fsinfo drives does. Just type 'cmd' into the search bar and open the application. status of your drives from the Command Prompt. Note that this batch method does not identify DVD drives, not sure why. In Windows, you can manually check the S.M.A.R.T. Set =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įor %%- in (%%) do if exist %%-: vol %%-: | find "in drive" Batch File echo Available Drives:įor %%v 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 "%%v:\\" Here's my batch file which includes both for commands you can comment-out the for command that you do not want to run by prefixing command lines with two colons ( ::). And select Command Prompt option to open Command Prompt. Volume in drive C is OS Volume in drive D is DATA Click Troubleshoot -> Advanced options to get into Advanced options screen.
Chk disk command e drive full#
The results from the original identified all available drive letters mixed in with for command processing the full set of capital letters.

I placed a pause command so that it wouldn't be necessary to run a "Command Prompt" beforehand in order to see the results when clicking on the batch file.
Chk disk command e drive serial number#
I piped the results to the external find command to filter serial number lines created by the vol command. The added command line off filtered the output to show results only. Testing the omission the two back slashes yields the same results. Since if exist will be checking for drive letters only, there will never be a space character in this test, so I omitted the double quotes.

For more information on chkdsk, refer to the Microsoft article below. Important: While performing chkdsk on the hard drive if any bad sectors are found on the hard drive when chkdsk tries to repair that sector if any data available on that might be lost. I also used the set command to create the variable that would contain the full set of capital letters in order to shorten the for command's length. To run checkdsk /f /r only on drive G, you may use the following command: Chkdsk g: /f /r. I wanted to share my batch edit/modification that based on cybercontroler's answer.įor my current project, I needed to identify which drive labeled as DATA so I replaced the echo command with vol (internal command). I absolutely love the pure batch method shown in the answer from cybercontroler, all internal commands no less!
