Using two commands simultaneously in DOS

  • Thread starter Thread starter jackson6612
  • Start date Start date
  • Tags Tags
    Dos
Click For Summary
SUMMARY

Using multiple commands simultaneously in DOS is achievable through command chaining. The user can utilize the "TREE" command to display directory structures, but to hide sub-folders, there is no direct command available. Instead, users can combine commands using the pipe operator (|) to limit output, such as "TREE C:\ | MORE". To abort a running command like "TREE", users can use the Ctrl+C keyboard shortcut to terminate the process immediately.

PREREQUISITES
  • Basic understanding of DOS command line interface
  • Familiarity with command chaining and piping in DOS
  • Knowledge of the "TREE" command syntax and functionality
  • Experience with keyboard shortcuts for command interruption
NEXT STEPS
  • Research command chaining techniques in DOS
  • Learn about the "MORE" command and its applications
  • Explore advanced DOS commands for file and directory management
  • Investigate keyboard shortcuts for efficient command line usage
USEFUL FOR

Anyone working with the DOS command line, including system administrators, IT professionals, and users looking to enhance their command line efficiency.

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.
 

Similar threads

Replies
9
Views
4K
  • · Replies 12 ·
Replies
12
Views
11K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 19 ·
Replies
19
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K