batch file - spaces/nulls inserted into redirected output of the cmd command -
when run command
wmic memorychip capacity from command line in cmd window, output on screen looks like:
capacity 2147483648 however, if add command batch file , try redirect output file, like:
wmic memorychip capacity >> %log% (where %log% log file want append data), gets saved in log file as:
c p c t y 2 1 4 7 4 8 3 6 4 8 here spaces got inserted before each character. in notepad++ shows nuls inserted, reason not able paste here :(
does know why output changed such way , how avoid transformation?
unicode sure.
try
wmic memorychip capacity |more>> %log%
Comments
Post a Comment