I have some trouble with cmd.exe
. I use it sometimes to create files and write there the output. But if I try this:
wmic logicaldisk get name, freespace >> output.txt
echo %date% >> output.txt
And I start it two to three times, I get an output.txt
like:
FreeSpace Name
17990881280 C:
D:
㠱〮⸴〲㈱ഠ䘊爀攀攀匀瀀愀挀攀 一愀洀攀 ഀ㜀㤀㤀 㠀㠀㈀㠀 䌀㨀 ഀ 䐀㨀 ഀ⸸㐰㈮′
Well, the Chinese text there looks funny, but I would like to see the date. I think somehow the encoding is changed with date. Everything is fine and I get the date if I do echo %date% >> output.txt
alone.
I would like to get the wmic
output and the date.
What should I do?