#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Location
    Warsaw
    Posts
    46
    Rep Power
    29

    TREE into a file


    Why after this command
    Code:
    TREE C:\  /A  > file1.txt
    I got only part of the tree in my file, and when I use
    Code:
    TREE C:\ /a
    everything is ok?( there is a full device tree in the console window).
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Maybe you didn't let tree finish? I just did that command on my windows 7 computer and ended up with a 1.3mb text file with the entire tree output in it. It took maybe 30 seconds to complete.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Location
    Warsaw
    Posts
    46
    Rep Power
    29
    Yeah, I've just resolved my problem. It was a fault of a codepage bug between cmd.exe and Windows. For Central Europe, cmd uses CP852 (DOS Latin II) and Windows - 1250 (Windows CE). That's why the tree crashed after seeing non-ASCII signs.
    The solution is very simple - add "chcp 1250" command at the beginning.

    Comments on this post

    • AdamPI agrees : For posting the solution.
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Thanks for posting the update.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo