What's new

Using DOS in Windows 8.1

TechnoMage

Active Member
Power User
I didn't know where to ask this, so here it is.
Even when running Windows 8.1, I occasionally need to do something in DOS. (the old Disk Operating System that pre-dated Windows)
Yesterday, I needed to find a file on my HD (SSD) so I tried the Windows Search command....to no avail. Typical!
So in desperation, I opened a Command Prompt and used the DOS "Dir" command to find the file, and it did. But the path was long and I wanted to send it to a text file in the root directory of C:. Years ago, I knew how to do that, but yesterday I could not remember the syntax.
So I'm wondering if anyone here knows how to do that RE-Direct of the output of a command, from the screen to a .txt file, in DOS?
Help! Help!

TM :cool:
 

My Computer

System One

  • OS
    Win-8.1/Pro/64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Acer X-1200
    CPU
    AMD 2 Core
    Motherboard
    Acer
    Memory
    Crucial, 4GB
    Graphics Card(s)
    NVIDEA GeForce 9200
    Sound Card
    On Board
    Monitor(s) Displays
    24" Acer
    Hard Drives
    Sandisk, SSD 500GB
    PSU
    Acer
    Case
    SFF Slimline
    Keyboard
    emachines 101 key
    Mouse
    Logitech Wireless
    Internet Speed
    5 Meg
    Browser
    Firefox
    Antivirus
    Windows Defender
    Other Info
    Using Classic Shell on Win-8.1 /pro/64

TechnoMage

Active Member
Power User
WOW, the old man finally fingered it out! The re-direct command is simply the (>) greater than symbol.
And, I could not send the output to the root directory because it is locked and protected.
In early versions of Windows that was not the case, as I remember it.
But, when I re-directed the output of the DIR command to an open Directory, the command worked.
Now I just hope I can remember that, the next time I need to do a Search using the DOS DIR command.

Y'all have a great day now, Y'hear?
TM :cool:
 

My Computer

System One

  • OS
    Win-8.1/Pro/64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Acer X-1200
    CPU
    AMD 2 Core
    Motherboard
    Acer
    Memory
    Crucial, 4GB
    Graphics Card(s)
    NVIDEA GeForce 9200
    Sound Card
    On Board
    Monitor(s) Displays
    24" Acer
    Hard Drives
    Sandisk, SSD 500GB
    PSU
    Acer
    Case
    SFF Slimline
    Keyboard
    emachines 101 key
    Mouse
    Logitech Wireless
    Internet Speed
    5 Meg
    Browser
    Firefox
    Antivirus
    Windows Defender
    Other Info
    Using Classic Shell on Win-8.1 /pro/64

Bree

Member
VIP Member
Member
WOW, the old man finally fingered it out!
And I had just prepared a screenshot for you, won't need it now. ;)

Yes, the root of C:\ is protected in W8 and above.

Another useful command line tool is the Pipe command | which pipes the result of one command to another. For example, piping to the Find command.

1656595720808.png
 

My Computer

System One

  • OS
    8.1
    System Manufacturer/Model
    Hyper-V

strollin

Old Guys Rule!
VIP Member
Pro User
In addition to the '>' and '|' command modifiers, there is '>>'. Both the '>' and '>>' direct the output of a command to a text file but a single '>' overwrites an existing file with the same name while the double '>>' appends to the existing file.
 

My Computer

System One

  • OS
    W10 Pro (desktop), W10 (laptop), W10 Pro (tablet)
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home built i7-8700K, Hp Envy x360 EVO Laptop, MS Surface Pro 7
    CPU
    3.7Ghz Core i7-8700K, 11th Gen Core i7-1165G7 4.7Ghz, 10th Gen Core™ i5-1035G4 1.1Ghz
    Motherboard
    ASUS TUF Z370-Pro Gaming, HP, MS
    Memory
    16G, 8G, 8G
    Graphics Card(s)
    AMD Radeon RX580, Intel Iris X Graphics, Intel Iris Plus Graphics G4
    Sound Card
    ATI High Definition Audio (Built-in to mobo)
    Monitor(s) Displays
    Dual Samsung U32J59 32 inch monitors, 13.3" display, 12.3" display
    Screen Resolution
    3840x2160 (Desktop), 1920x1080 (laptop), 2736x1824 Pro 7
    Hard Drives
    500GB ssd boot drive with 2 & 10TB Data (Desktop), 512GB ssd (laptop), 128GB SSD (tablet)
    PSU
    Corsair CX 750M
    Case
    Antec 100
    Cooling
    Coolermaster CM 212+
    Keyboard
    IBM Model M - used continuously since 1986
    Mouse
    Microsoft IntelliMouse
    Internet Speed
    665Mbps/15Mbps down/up
    Browser
    FireFox, MS Edge
    Antivirus
    Defender on all
    Other Info
    Retired in 2015 after working in the tech industry for 41 years. First 10 years as a Technician, the rest as a programmer/software engineer. After 1 year of retirement, I was bored so went back to work as a Robotic Process Automation Consultant. Retired for 3rd (and final) time in 2019.

TechnoMage

Active Member
Power User
It's good to see that others still use DOS too. May it never die!
I've just forgotten so much of it. I'll probably be back, one day, asking more dumb questions.
It's just amazing to me, that somewhere under Windows lurks DOS, alive and well.

Thanks again Mates!
 

My Computer

System One

  • OS
    Win-8.1/Pro/64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Acer X-1200
    CPU
    AMD 2 Core
    Motherboard
    Acer
    Memory
    Crucial, 4GB
    Graphics Card(s)
    NVIDEA GeForce 9200
    Sound Card
    On Board
    Monitor(s) Displays
    24" Acer
    Hard Drives
    Sandisk, SSD 500GB
    PSU
    Acer
    Case
    SFF Slimline
    Keyboard
    emachines 101 key
    Mouse
    Logitech Wireless
    Internet Speed
    5 Meg
    Browser
    Firefox
    Antivirus
    Windows Defender
    Other Info
    Using Classic Shell on Win-8.1 /pro/64

Bree

Member
VIP Member
Member
It's just amazing to me, that somewhere under Windows lurks DOS, alive and well.
Not quite - DOS was an entire operating system, with a command line interpreter named COMMAND.COM. From Windows XP onwards the underlying OS is Windows NT, with a CMD.EXE interpreter that supports the same command set as DOS.
 

My Computer

System One

  • OS
    8.1
    System Manufacturer/Model
    Hyper-V

TechnoMage

Active Member
Power User
Call it what you want, but DOS commands still work. And I love it, that my old DOS batch files still run.
 

My Computer

System One

  • OS
    Win-8.1/Pro/64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Acer X-1200
    CPU
    AMD 2 Core
    Motherboard
    Acer
    Memory
    Crucial, 4GB
    Graphics Card(s)
    NVIDEA GeForce 9200
    Sound Card
    On Board
    Monitor(s) Displays
    24" Acer
    Hard Drives
    Sandisk, SSD 500GB
    PSU
    Acer
    Case
    SFF Slimline
    Keyboard
    emachines 101 key
    Mouse
    Logitech Wireless
    Internet Speed
    5 Meg
    Browser
    Firefox
    Antivirus
    Windows Defender
    Other Info
    Using Classic Shell on Win-8.1 /pro/64

TechnoMage

Active Member
Power User
Topic Revisited:

As an update or whatchamacallit, I just wanted to mention, that when I back up this old Acer SFF desktop PC, I use "Ghost 11.5" booting up with a CD or Flash Drive that uses DOS to boot the PC and run Ghost. (Ghost 11.5 was the last of the DOS based versions)
It's basically the same boot disk that I developed with a group of Utilities, back pre-2000.

This little PC seems to prefer a DOS based boot disk, over a Windows based disk. ???

Cheers mates!
TM :cool:
 

My Computer

System One

  • OS
    Win-8.1/Pro/64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Acer X-1200
    CPU
    AMD 2 Core
    Motherboard
    Acer
    Memory
    Crucial, 4GB
    Graphics Card(s)
    NVIDEA GeForce 9200
    Sound Card
    On Board
    Monitor(s) Displays
    24" Acer
    Hard Drives
    Sandisk, SSD 500GB
    PSU
    Acer
    Case
    SFF Slimline
    Keyboard
    emachines 101 key
    Mouse
    Logitech Wireless
    Internet Speed
    5 Meg
    Browser
    Firefox
    Antivirus
    Windows Defender
    Other Info
    Using Classic Shell on Win-8.1 /pro/64
Top