Re: [OT] Using DIR (CMD) with redirection to a file
- Posted by jimcbrown (admin) Oct 05, 2009
- 2462 views
Hi,
Norway uses the same letters as in English alphabet, with the addition to 3 extra letters - ÆØÅ.
When I try to use the DIR (Console, Windows) command with redirection to file output instead of screen, these letters come out garbled. The letters are shown correctly when displayed directly on screen.
This is the parameters I use in the DIR command;
@dir /n /a /ogen /q /tc
GDC-VNAS-A12.res.no.enterdir.com\A12_PRO01\13079\shared\*.* >C:\WINDOWS\Profiles\111951\desktop\Shared_area_changes.txt
Does anyone know how I can keep the letters intact when redirecting the DIR output to a file?
Kenneth / ZNorQ
How are you displaying the file? What makes you think it is garbled? Are you using Notepad or Wordpad to open it?
If you redirect the listing to a file, and then display the contents of that file on the same console using "type C:\WINDOWS\Profiles\111951\desktop\Shared_area_changes.txt", are the results still garbled?
This sounds like a file text encoding issue.