I want to redirect a file to a text file with a specific filename. The filename should be the serial number of the machine. I currently have the below command but for some reason, the output is different from what I want.
@echo off
set serial=wmic bios get serialnumber
set bit=manage-bde -status C:
%bit% > "C:\Users\Frangon\Desktop\%serial%.txt"
pause
It redirects the %bit%
to a text file but the filename becomes wmic bios get serialnumber
instead of the SERIAL NUMBER of the machine.
Please help as I'm stuck.