Window 7 And 8. Dir>list.txt Sends File Size Is Unreadable Eg 32ÿ032

Discussion in 'Software' started by deongl, Jan 18, 2017.

Tags:
  1. deongl

    deongl Private E-2

    dir>list.txt result looks as follow:
    Volume in drive C has no label.
    Volume Serial Number is 6EA5-4BCA

    Directory of c:\FileStructurePrev

    2017-01-18 09:23 AM <DIR> .
    2017-01-18 09:23 AM <DIR> ..
    2016-10-18 09:38 PM 32ÿ032 error messages plus.docx
    2002-10-18 02:19 PM 195 filestruc.bat
    2002-10-18 02:20 PM 1ÿ588ÿ209 filestruc.txt
    2004-03-07 03:26 AM 275ÿ792 FileStrucSize.txt
    Note this does not happen in win xp.
     
  2. Anon-469e6fb48c

    Anon-469e6fb48c Anonymized

    So what is your main question.

    Are you having issues.

    I understand that this is DOS / command prompt.

    But what are you looking for.

    Need more info on the issue.
     
  3. UPI

    UPI Private E-2

    He's just piping output of the dir command to a text file.

    Windows 10 here, 64 bit, works fine.

    Files were also created using Win7/8? Just to rule out file system issues, does chkdsk /f change anything?
     
  4. UPI

    UPI Private E-2

    And a dir command shows file sizes fine?
     
  5. dr.moriarty

    dr.moriarty Malware Super Sleuth Staff Member

  6. GermanOne

    GermanOne Guest

    Code pages (character encoding) of console applications (such as cmd.exe) and Windows applications (such as notepad.exe) are different. E.g. in the US it's usually 437 for the console and 1252 for Windows. For whatever reason it seems that deongl changed the default setting for the thousands separator from comma to non-breaking space (probably in the registry "HKEY_CURRENT_USER\Control Panel\International" value "sThousand"). Byte 0xFF is interpreted as NBSP in CP 437 but as ÿ in CP 1252.
    The easiest way to solve the problem is disabling the thousands separator with option /-C
    DIR /-C
    But if you have to worry about non-ASCII characters in file names your best bet is to change the code page using CHCP.
    Code:
    >nul chcp 1252
    >"list.txt" dir /-c
    >nul chcp 437
    
     
    UPI likes this.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds