Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Help with a DOS command in Vista

Reply
Thread Tools Display Modes

Help with a DOS command in Vista

 
 
PT
Guest
Posts: n/a

 
      04-19-2009
Vista Ultimate - 64 bit

In one of my folders, I have an extensive sub- folder tree which I'd like to
print out as a Word file. Here's what I've done:

1. I click Start | Programs | Accessories | Command Prompt
2. Using the CD command, I get to the head folder of the desire sub-folder
tree
3. If I then run the command "Tree", the sub-folder tree scrolls by quickly
in the desired format - i.e., like a genealogy chart, with lines connecting
the various levels.

But if I try to pipe the output to a text or Word file using the command
tree>tree.txt or tree>.tree.doc, I get the tree.
But the nice lines linking the various levels are replaced by a sequence of
bogus characters.

The maddening thing is that I was earlier able to get the nice chart into a
Word document. But I neglected to record the steps, and can't reproduce
them.

Suggestions welcome.

--

PT



 
Reply With Quote
 
 
 
 
DaveD
Guest
Posts: n/a

 
      04-19-2009
TREE /? will give you the answer
You need to use the /a switch to save the file as ASCII


"PT" <> wrote in message
news:%...
> Vista Ultimate - 64 bit
>
> In one of my folders, I have an extensive sub- folder tree which I'd like
> to
> print out as a Word file. Here's what I've done:
>
> 1. I click Start | Programs | Accessories | Command Prompt
> 2. Using the CD command, I get to the head folder of the desire
> sub-folder
> tree
> 3. If I then run the command "Tree", the sub-folder tree scrolls by
> quickly
> in the desired format - i.e., like a genealogy chart, with lines
> connecting
> the various levels.
>
> But if I try to pipe the output to a text or Word file using the command
> tree>tree.txt or tree>.tree.doc, I get the tree.
> But the nice lines linking the various levels are replaced by a sequence
> of
> bogus characters.
>
> The maddening thing is that I was earlier able to get the nice chart into
> a
> Word document. But I neglected to record the steps, and can't reproduce
> them.
>
> Suggestions welcome.
>
> --
>
> PT
>
>
>


 
Reply With Quote
 
DaveD
Guest
Posts: n/a

 
      04-19-2009
I've played around a bit and found a solution you'll probably llike better:

Save your tree without using the /a switch.

Then, open the file in Word and select the Text Encoding option European-DOS
This makes for a prettier tree.
Your tree was encoded using the ANSI standard.

Isn't life complicated?



"DaveD" <> wrote in message
news:...
> TREE /? will give you the answer
> You need to use the /a switch to save the file as ASCII
>
>
> "PT" <> wrote in message
> news:%...
>> Vista Ultimate - 64 bit
>>
>> In one of my folders, I have an extensive sub- folder tree which I'd like
>> to
>> print out as a Word file. Here's what I've done:
>>
>> 1. I click Start | Programs | Accessories | Command Prompt
>> 2. Using the CD command, I get to the head folder of the desire
>> sub-folder
>> tree
>> 3. If I then run the command "Tree", the sub-folder tree scrolls by
>> quickly
>> in the desired format - i.e., like a genealogy chart, with lines
>> connecting
>> the various levels.
>>
>> But if I try to pipe the output to a text or Word file using the command
>> tree>tree.txt or tree>.tree.doc, I get the tree.
>> But the nice lines linking the various levels are replaced by a sequence
>> of
>> bogus characters.
>>
>> The maddening thing is that I was earlier able to get the nice chart into
>> a
>> Word document. But I neglected to record the steps, and can't reproduce
>> them.
>>
>> Suggestions welcome.
>>
>> --
>>
>> PT
>>
>>
>>

>


 
Reply With Quote
 
PT
Guest
Posts: n/a

 
      04-19-2009
Voila! - Thanks

--

PT
"DaveD" <> wrote in message
news:uyXU$...
> I've played around a bit and found a solution you'll probably llike
> better:
>
> Save your tree without using the /a switch.
>
> Then, open the file in Word and select the Text Encoding option
> European-DOS
> This makes for a prettier tree.
> Your tree was encoded using the ANSI standard.
>
> Isn't life complicated?
>
>
>
> "DaveD" <> wrote in message
> news:...
>> TREE /? will give you the answer
>> You need to use the /a switch to save the file as ASCII
>>
>>
>> "PT" <> wrote in message
>> news:%...
>>> Vista Ultimate - 64 bit
>>>
>>> In one of my folders, I have an extensive sub- folder tree which I'd
>>> like to
>>> print out as a Word file. Here's what I've done:
>>>
>>> 1. I click Start | Programs | Accessories | Command Prompt
>>> 2. Using the CD command, I get to the head folder of the desire
>>> sub-folder
>>> tree
>>> 3. If I then run the command "Tree", the sub-folder tree scrolls by
>>> quickly
>>> in the desired format - i.e., like a genealogy chart, with lines
>>> connecting
>>> the various levels.
>>>
>>> But if I try to pipe the output to a text or Word file using the command
>>> tree>tree.txt or tree>.tree.doc, I get the tree.
>>> But the nice lines linking the various levels are replaced by a sequence
>>> of
>>> bogus characters.
>>>
>>> The maddening thing is that I was earlier able to get the nice chart
>>> into a
>>> Word document. But I neglected to record the steps, and can't reproduce
>>> them.
>>>
>>> Suggestions welcome.
>>>
>>> --
>>>
>>> PT
>>>
>>>
>>>

>>

>



 
Reply With Quote
 
DaveD
Guest
Posts: n/a

 
      04-19-2009
BTW - If you do a lot of this, you might want to put a Command Prompt option
on your right-click context menu.
It allows you to open any directory in a Command Prompt (DOS) window,
without needing to type in a long string for the CD command.

Just cut and paste this text (without the *** of course) into a .reg file,
then load that and voila!

******************
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]
@="Command Prompt"
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\co mmand]
@="cmd.exe /k CD /d %1"

[HKEY_CLASSES_ROOT\Drive\shell\CommandPrompt]
@="Command Prompt"
[HKEY_CLASSES_ROOT\Drive\shell\CommandPrompt\comman d]
@="cmd.exe /k CD /d %1"
******************


"PT" <> wrote in message
news:%...
> Voila! - Thanks
>
> --
>
> PT
> "DaveD" <> wrote in message
> news:uyXU$...
>> I've played around a bit and found a solution you'll probably llike
>> better:
>>
>> Save your tree without using the /a switch.
>>
>> Then, open the file in Word and select the Text Encoding option
>> European-DOS
>> This makes for a prettier tree.
>> Your tree was encoded using the ANSI standard.
>>
>> Isn't life complicated?
>>
>>
>>
>> "DaveD" <> wrote in message
>> news:...
>>> TREE /? will give you the answer
>>> You need to use the /a switch to save the file as ASCII
>>>
>>>
>>> "PT" <> wrote in message
>>> news:%...
>>>> Vista Ultimate - 64 bit
>>>>
>>>> In one of my folders, I have an extensive sub- folder tree which I'd
>>>> like to
>>>> print out as a Word file. Here's what I've done:
>>>>
>>>> 1. I click Start | Programs | Accessories | Command Prompt
>>>> 2. Using the CD command, I get to the head folder of the desire
>>>> sub-folder
>>>> tree
>>>> 3. If I then run the command "Tree", the sub-folder tree scrolls by
>>>> quickly
>>>> in the desired format - i.e., like a genealogy chart, with lines
>>>> connecting
>>>> the various levels.
>>>>
>>>> But if I try to pipe the output to a text or Word file using the
>>>> command
>>>> tree>tree.txt or tree>.tree.doc, I get the tree.
>>>> But the nice lines linking the various levels are replaced by a
>>>> sequence of
>>>> bogus characters.
>>>>
>>>> The maddening thing is that I was earlier able to get the nice chart
>>>> into a
>>>> Word document. But I neglected to record the steps, and can't
>>>> reproduce
>>>> them.
>>>>
>>>> Suggestions welcome.
>>>>
>>>> --
>>>>
>>>> PT
>>>>
>>>>
>>>>
>>>

>>

>
>


 
Reply With Quote
 
pacinitaly
Guest
Posts: n/a

 
      04-19-2009

I'm dense,


I tried to type:
tree c: /a
and it just goes by.
How do I export to a word file?

check the attached app. not what you want but it's cool

ps thanks Dave for the reg file.


+-------------------------------------------------------------------+
|Filename: JDirPrinter.exe |
|Download: http://www.vistax64.com/attachment.p...hmentid=11987|
+-------------------------------------------------------------------+

--
pacinitaly

ASCII stupid question, Get A Stupid ANSI
 
Reply With Quote
 
the wharf rat
Guest
Posts: n/a

 
      04-19-2009
In article <>,
pacinitaly <> wrote:
>
>I'm dense,
>
>
>I tried to type:
>tree c: /a
>and it just goes by.
>How do I export to a word file?
>


tree c:/a >foo.txt

 
Reply With Quote
 
DaveD
Guest
Posts: n/a

 
      04-19-2009
You have to use the redirect symbol (>) :

tree c: /a >treefile.txt

That puts the output of the command to a file instead of the screen. It's a
standard command file (DOS) technique.

Then just double-click that file to open it (the .txt extension means it
opens in Notepad by default)

However, as I said to the original poster, you get a better-looking listing
by NOT using the /a switch, and letting the command default to ANSI output:

tree c: >treefile.txt

then right-click and open with Word.
Once in Word, select the file conversion option MS-DOS. That will format the
lines of the tree correctly.



"pacinitaly" <> wrote in message
news:...
>
> I'm dense,
>
>
> I tried to type:
> tree c: /a
> and it just goes by.
> How do I export to a word file?
>
> check the attached app. not what you want but it's cool
>
> ps thanks Dave for the reg file.
>
>
> +-------------------------------------------------------------------+
> |Filename: JDirPrinter.exe |
> |Download: http://www.vistax64.com/attachment.p...hmentid=11987|
> +-------------------------------------------------------------------+
>
> --
> pacinitaly
>
> ASCII stupid question, Get A Stupid ANSI


 
Reply With Quote
 
pacinitaly
Guest
Posts: n/a

 
      04-19-2009

excellent !!!!!!!!!!

thanks again


--
pacinitaly

ASCII stupid question, Get A Stupid ANSI
 
Reply With Quote
 
Gary M
Guest
Posts: n/a

 
      04-20-2009
Doesn't holding down the shift key then right clicking add the "Open Command
Window Here" without having to edit the registry?

"DaveD" <> wrote in message
news:...
> BTW - If you do a lot of this, you might want to put a Command Prompt
> option on your right-click context menu.
> It allows you to open any directory in a Command Prompt (DOS) window,
> without needing to type in a long string for the CD command.
>
> Just cut and paste this text (without the *** of course) into a .reg
> file, then load that and voila!
>
> ******************
> Windows Registry Editor Version 5.00
>
> [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]
> @="Command Prompt"
> [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\co mmand]
> @="cmd.exe /k CD /d %1"
>
> [HKEY_CLASSES_ROOT\Drive\shell\CommandPrompt]
> @="Command Prompt"
> [HKEY_CLASSES_ROOT\Drive\shell\CommandPrompt\comman d]
> @="cmd.exe /k CD /d %1"
> ******************
>
>
> "PT" <> wrote in message
> news:%...
>> Voila! - Thanks
>>
>> --
>>
>> PT
>> "DaveD" <> wrote in message
>> news:uyXU$...
>>> I've played around a bit and found a solution you'll probably llike
>>> better:
>>>
>>> Save your tree without using the /a switch.
>>>
>>> Then, open the file in Word and select the Text Encoding option
>>> European-DOS
>>> This makes for a prettier tree.
>>> Your tree was encoded using the ANSI standard.
>>>
>>> Isn't life complicated?
>>>
>>>
>>>
>>> "DaveD" <> wrote in message
>>> news:...
>>>> TREE /? will give you the answer
>>>> You need to use the /a switch to save the file as ASCII
>>>>
>>>>
>>>> "PT" <> wrote in message
>>>> news:%...
>>>>> Vista Ultimate - 64 bit
>>>>>
>>>>> In one of my folders, I have an extensive sub- folder tree which I'd
>>>>> like to
>>>>> print out as a Word file. Here's what I've done:
>>>>>
>>>>> 1. I click Start | Programs | Accessories | Command Prompt
>>>>> 2. Using the CD command, I get to the head folder of the desire
>>>>> sub-folder
>>>>> tree
>>>>> 3. If I then run the command "Tree", the sub-folder tree scrolls by
>>>>> quickly
>>>>> in the desired format - i.e., like a genealogy chart, with lines
>>>>> connecting
>>>>> the various levels.
>>>>>
>>>>> But if I try to pipe the output to a text or Word file using the
>>>>> command
>>>>> tree>tree.txt or tree>.tree.doc, I get the tree.
>>>>> But the nice lines linking the various levels are replaced by a
>>>>> sequence of
>>>>> bogus characters.
>>>>>
>>>>> The maddening thing is that I was earlier able to get the nice chart
>>>>> into a
>>>>> Word document. But I neglected to record the steps, and can't
>>>>> reproduce
>>>>> them.
>>>>>
>>>>> Suggestions welcome.
>>>>>
>>>>> --
>>>>>
>>>>> PT
>>>>>
>>>>>
>>>>>
>>>>
>>>

>>
>>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the command line command for unzipping files? Jim H Windows Vista General Discussion 3 12-04-2008 03:22 AM
Command Line Ren (Rename) command broken? SixSigmaGuy Windows Vista General Discussion 5 05-20-2008 10:52 AM
net use command over dial up on Vista CrC Windows Vista General Discussion 1 10-17-2007 10:05 PM
Sys Command in Vista John Braham Windows Vista General Discussion 2 05-15-2007 02:14 PM
Does Vista have a command console?? chrisgruntled Windows Vista Administration 2 07-15-2006 01:27 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59