Hi, when I first time with a BATCH script, I get the hard disk size as follows:
wmic diskdrive get size
Which works fine, but I would like to store this value in a variable for later use, for example, using ECHO to display the value.
I'm not sure how to set the output of the above command to a variable. I went with:
SET hddbytes=wmic diskdrive get size
But that just sets the variable to the above text string, not the output.
twigg source share