Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7834437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:09:04+00:00 2026-06-02T13:09:04+00:00

I have some trouble with cmd.exe . I use it sometimes to create files

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T13:09:13+00:00Added an answer on June 2, 2026 at 1:09 pm

    WMIC has some weird output. I’ve seen a discussion where it was said WMIC uses unicode, but I think the situation is more complicated than that. If I capture WMIC output to a file and use a hex editor, I see an extra carriage return at the end of each line. I am completely at a loss as to how the date content is converted into gibberish when the output.txt is typed. (codepage issue? but how?) On my machine I get question marks where the date should be.

    I was able to fix the problem by using

    wmic logicaldisk get name, freespace | more >>output.txt
    echo %date%>>output.txt 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some trouble with jquery ui-events: In my application, there are some sliders.
I'm migrating to Nhibernate 2.0 GA but have some trouble with setting cache expirations
I am developing a small windows app, but have some trouble deciding whether to
I have some trouble with python. I am trying to get output from a
I have some trouble matching the contents inside php tags. Currently I have this
I have some trouble to update my sql server 2005 database when i use
I have some trouble showing/hiding this menu on mouse enter. I'd like the menu
I have some trouble understanding this one so here it is. I'm trying to
I have some trouble understanding parsing XML structures with SAX. Let's say there is
I have some trouble getting this particular kernel patch to compile correctly with my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.