Page 1 of 1

How to get drive numbering from command line?

Posted: Mon Mar 15, 2021 1:12 pm
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?

Re: How to get drive numbering from command line?

Posted: Mon Mar 15, 2021 3:19 pm
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.