How to get drive numbering from command line?

User discussion and information resource forum for Image products.
Post Reply
zachbrown
Posts: 2
Joined: Mon Mar 15, 2021 1:06 pm

How to get drive numbering from command line?

Post by zachbrown »

I'm setting up a batch file to image a few drive partitions using the IFWRotate scripts and would like to be able to specify drive letters since the drive number does not seem to be static. At first I thought it used the same numbering as diskpart but that does not seem to be the case. I realize I can specify the drive letter with /d:?C but that does not seem to work when specifying a partition. Is there a way to query the drive numbering from the command line by specifying the drive letter?
TeraByte Support
Posts: 3598
Joined: Thu May 05, 2011 10:37 pm

Re: How to get drive numbering from command line?

Post by TeraByte Support »

You can use the disk signature instead of drive number. Enable the global option "Output Disk ID to Command Line" in the general tab, then choose operation, when you view command or save to a .bat or .cmd file it will use the diskID instead of the number.

As far as getting the number, you can use /L option redirected to a file (need to be elevated to start with or you lose the pipe). Also, you can use TBScript to get the drives information.
Post Reply