Re: [OT] Using DIR (CMD) with redirection to a file

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...
znorq2 said...

UUps, this didn't come out like I wanted... :(

Fixed it for you. You can use the triple brackets {{{/}}} to print output literally.

-Greg

Ok, thanks Greg - but does that include the slash - "/"?

kinz said...
kinz said...

Hi znorq2,

In file names and commands Windows uses the OEM (DOS) encoding,
but in .txt and other text files the native Windows encoding.

In Russian OEM is cp866, Windows - cp1251.

I recode my DIR output from 866 to 1251 to read it in Notepad properly.

Or just use in Notepad the Terminal font.

Regards,
kinz

Hi kinz,

When opening the console, default code page is 850. According to this page sent to me earlier, 865 (Nordic) is probably the one I should change to before running the DIR command...

This is what I did;

  1. Created folder "æøåÆØÅ" under "c:\data\test".
  2. Opened console (cmd)
  3. Changed to "c:\data\test"
  4. Confirmed current code page 850 (using chcp w/o params.)
  5. chcp 865
  6. dir *.* /b > files.txt
  7. Opened "files.txt" using notepad.
  8. Changed to font to "Terminal".


Letters "æøåÆØÅ" are now visible.

I use Font "Lucida Console" / Script "Western" as a default (did a little research, and this is the default font/script setting for everybody..), and æøåÆØÅ is perfectly usable characters in this font. But, when æøåÆØÅ is routed through DIR's redirection, it becomes garbled. Apperantly, they have a different byte representation in Western script compared to OEM/DOS? If so, it seems I have to go through the file replacing it with the correct byte representation for "Lucidia Concole / Western", (which shouldn't really be a problem..)?

That said, I would have used Euphoria - and not Console/DIR, but I've got no idea how I can produce the information I'm after (with the exception of path/filename, ofcourse);

  1. Created date/time
  2. Created by
  3. Filename/path


Kenneth / ZNorQ

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu