The Mudcat Café TM
Thread #148346   Message #3444997
Posted By: JohnInKansas
30-Nov-12 - 04:41 PM
Thread Name: Tech: TSR to redirect LPT to file - DOS only
Subject: RE: Tech: TSR to redirect LPT to file - DOS only
The COMMAND PROMPT in recent Windows versions is very similar to the DOS PROMPT in earlier versions, but each new version has slightly modified how some commands work and several commands have been removed. Most of the simpler commands that the majority of casual users were likely to have used are still present and still work much the same as ever.

In any version, in a Command Prompt or DOS Prompt window, if you type a command followed by /? and hit Enter you'll get a fairly complete description of what the current version of that command can do.

Example:

DIR /?

gives two full screens of "variations" (switches) you can use to control how the result (list of files) is shown as a result.

For commands that require a completion, you can just type the base command name and hit enter, without the formal "/?" query tag, but there's an extremely slight chance that you'll accidentally "do something" you don't intend to actually do instead of seeing the list of features for the command, so the full form is preferable.

The main problem is knowing what command "names" are still useful, but if you type a "NAME /?" for something that's been removed you'll just get a "COMMAND NOT FOUND" or something similar.

Possibly applicable to the original question in this thread, Win7 shows:

     C:\Windows\System32>TYPE /?
     Displays the contents of a text file or files.

     TYPE [drive:][path]filename

     C:\Windows\System32>PRINT /?
     Prints a text file.

     PRINT [/D:device] [[drive:][path]filename[...]]

        /D:device   Specifies a print device.

There is little accessible information on using recent versions, so it would be hard to find some other things that were commonly known by DOS users, but many supplemental switches/redirects/etc still work.

"DIR *.*" displays a list of the files in your current directory

"DIR *.* >filename.txt" sends the list of files to a text file, that you can open in Notepad or your WP program (Word?).

The "pipe" switch (|) still mostly works, so far as I've seen, but most Command Prompt screen results are automatically "paged" if multiple screens are needed, so it's seldom necessary for simple stuff.

A little noticed feature in Command Prompt is the tiny square icon that displays the drive you're on, in the top bar. Clicking there gives you a dropdown menu of a few things you can do that were more difficult in earlier versions. On the Edit, you can "Mark" a block of text in the display. Once marked you can "Copy" the marked text to paste it in another program.

The Size function on the dropdown lets you change the length of the Command Prompt window, but you can't change the width.

For the things most people are likely to want to do, the DOS Prompt and Command parts are interchangeable, even though they really aren't the same animal.

John