Solved wmic DISKDRIVE|find /i SSDnul

Mobile computing solutions Mini itx pfse...
December 22, 2015 at 12:31:40
Specs: Windows XP, HexaCore AMD FX-6100, 1400 MHz (7 x 200) / 4gb DDR
I discovered a tool I found that detects an SSD drives by drive letter does not work on AHCI Enhanced Host Controller Interface's so I am back to the drawing board :( I did find that wmic is capable but I do not know how to format the search to be for a specific drive letter ? I have tried some of the following but to no avail.

wmic idecontroller|find /i "ahci">nul && echo AHCI detected

wmic DISKDRIVE|find /i "SSD">nul && echo SSD detected

wmic DISKDRIVE list|find /i "SSD">nul && echo SSD detected

wmic logicaldisk get caption=C:|find /i "C:">nul find /i "SSD">nul && echo SSD detected

My problem is that their are 2 captions in 2 separate types logicaldisk and diskdrive !!!

So I want to search logicaldisk for C: drive and find if under DISKDRIVE it equals an SSD

I have managed to find both things under seperate searches but not combined and for just C: or D: etc as want to do the searches independently.

Michelle xoxoxo

If Dreams Come True Oleg Would be Famous so far he's very shy, so much for Being Famous ;)

message edited by Ortorea

See More: wmic DISKDRIVE|find /i SSDnul

Report •

December 22, 2015 at 16:44:37
It seems like too much work but this article has some clues worth reading


If Dreams Come True Oleg Would be Famous so far he's very shy, so much for Being Famous ;)

Report •

December 23, 2015 at 23:51:34
✔ Best Answer
you might try: wmic volume list
and use that as the basis for further refinements. It seems to give the association you want, of drive-letter with drive filesystem architecture. It worked ok with a simple test I ran:
wmic volume list | find /I "ntfs" | find /I "C:"

Report •

December 24, 2015 at 01:26:44
Dear nbrane thank you for you reply, I tried this but unfortunately the data I seek does not appear in the volume list, which is SSD but alas I did find a third party tool that works on both windows XP and Windows 7 and higher it works by going direct to the SMART information stored in the hard drive where the data is located that I want. For anyone else also looking for the solution it is the smartmon tools that has a small exe file called smartctl.exe

It works well and the file size it less than 1mb making it a great solution and open source too, still if their was some code that could be directly in my batch would be preferable but for now this is a solution.

So by using this command it works well.

smartctl -a C:|find "SSD">nul &&set cnul=1&&>> %State% echo Drive C: IS A SSD DRIVE SKIPPING DEFRAG && echo Drive C: IS A SSD DRIVE SKIPPING DEFRAG && goto :nocfrag || set cnul=0&& echo Drive C: IS NOT AN SSD DRIVE DEFRAGGING



If Dreams Come True Oleg Would be Famous so far he's very shy, so much for Being Famous ;)

Report •

Related Solutions

December 27, 2015 at 08:58:59
Drive letters are assigned to volumes, which reside in partitions, which live on the physical disk. Using WMI to find the relationships is possible since there are classes to represent all three, but it's logic better handled in a more native scripting language, like VBScript if compatibility between Windows versions is a concern.

Also note that a drive can have no partitions, and partitions can contain non-Windows volumes. Additionally, a volume can span across multiple partitions/drives.

How To Ask Questions The Smart Way

Report •

Ask Question