Using two commands simultaneously in DOS

  • Thread starter Thread starter jackson6612
  • Start date Start date
  • Tags Tags
    Dos
AI Thread Summary
Using multiple DOS commands in a single line is possible, but specific syntax is required. To display only the top-level directories without sub-folders using the TREE command, there isn't a direct command to hide sub-folders. However, users can utilize the DIR command instead, which allows for more control over the output. For instance, the command "DIR C:\" will list only the top-level directories.Regarding the TREE command combined with the MORE command, if a user wants to abort the command while it's running, they can typically use Ctrl-C to stop the output. This allows them to regain control without waiting for the entire list to finish displaying.
jackson6612
Messages
334
Reaction score
1
Hi

1: Is this possible to use two or more DOS commands in the same line. When I enter the command "TREE C:\" it displays all the folders (=directories) and sub-folders present there in the drive C. But I don't want to see the sub-folders displayed in the tree. I don't know the command for hiding the sub-folders. I hope there is one. That would mean I need two commands in the same line, i.e., [Command to hide the sub-folders] [TREE] [C:\].

Could you please help me with it?

2: Suppose I enter the command "TREE C:\ |MORE". I would get a limited list of the folders and sub-folders and then I would have to press/tap ENTER key to see the remaining list. Suppose, in the midway I want to abort that TREE command, how could I do it? Do I have to the list to its very end to enter a new command? Please have a look on the video:
 
Last edited by a moderator:
Technology news on Phys.org
Why TREE and not just DIR? Try if Ctrl-C doesn't stop the listing.

I have not used DOS prompt in ages, so I can be wrong.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top