I have a BAT file with the following:
wmic diskdrive get serialnumber > test.txt
It almost works, but the command has an issue when manufacturers entered the serial number in Hex. For instance drive serial on HD is abc123
the output given is ba1c32
, so every pair is flipped. I will use the same model laptops/Hard drives so the input is guaranteed to stay constant.
Is there any way to edit the output to correct this issue so the text.txt file has the correct serial number? I cannot use outside scripting (this would be so easy in python/VBA), everything has to be done through the command prompt/batch file.
Any help is greatly appreciated. Thanks in advance.