|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (8 bit)
|
Begining DOS help
Hey.
I'm on vacation right now, so that gives me tons of spare time. I've decided to try to learn DOS, but I dont really know where to start. I know some simple stuff, such as the "dir" command, but other than that, can someone give me some others to try? Or an online resource maybe, thanks a lot. |
|
|
|
|
|
#2 |
|
Moderator
Staff
Premium Member
Join Date: Sep 2004
Location: Cardiff, Wales. UK
Posts: 6,601
|
When ever I need a DOS command I don't know I just do a google search, there are hundreds of sites out there dedicated to DOS.
__________________
Niwa no niwa ni wa, niwa no niwatori wa niwaka ni wani o tabeta. |
|
|
|
|
|
#3 |
|
Member (14 bit)
Premium Member
Join Date: Jan 2002
Location: The Great NorthWest
Posts: 12,594
|
As mentioned above, there are numerous sites that cover DOS pretty good. Here's just one:
http://www.computerhope.com/msdos.htm HTH TwoRails |
|
|
|
|
|
#4 |
|
Member (11 bit)
Join Date: Feb 2003
Location: Tucker Ga. USA
Posts: 1,368
|
If you are in DOS, at the command line, type help junk.
You'll get an error message overlaying the set of commands. Arrow to a help topic and you'll get the syntax and examples. This is an assumption of 6 to 6.22, and since the help is in the editor you exit out with [ALT] , [F], [X]. |
|
|
|
|
|
#5 |
|
Member (8 bit)
|
Thanks a lot.
I guess this brings me to my next question, what do you use DOS for on a daily basis? Or even on a non-daily basis? |
|
|
|
|
|
#6 |
|
Member (14 bit)
Premium Member
Join Date: Jan 2002
Location: The Great NorthWest
Posts: 12,594
|
DOS, now call the Command Line in XP, is usefull for automatically performing various tasks. That's how I check all my hard drives for errors is thru a batch file, now called a .cmd instead of .bat file. I do 95% of all my data backup to DVD/CD-RW using batch file(s).
|
|
|
|
|
|
#7 |
|
Member (9 bit)
|
Hey, I thought XP was DOS free? Gates said so
Knowing a little DOS can be nice. For one thing you can start in DOS and get around Windows and delete the index.dat file that keeps track of where you go on the net [companies can use this to track their workers, or people can find out your online banking site etc.] DOS can also del a number of other temp internet files that may hold your account #s ect. I use DOS to delete my temp internet files and temp files from time to time. Internet explorer doesn't always do a clean sweep. Two rails: do you use the copy command to transfer to DVD/CD? Does that get all the files? |
|
|
|
|
|
#8 | |
|
Member (14 bit)
Premium Member
Join Date: Jan 2002
Location: The Great NorthWest
Posts: 12,594
|
Quote:
No I don't use "copy," I use "xcopy." Yes, it gets all the files, and has more options than "copy." Use the command line switch, "/?" after the command to see all switches / options. For example, from DOS or the command prompt: xcopy /? |
|
|
|
|
|
|
#9 |
|
Member (9 bit)
|
Of course this leads to the question... if Win XP is DOS free, what is the command language that is there? Hmmm...
|
|
|
|
|
|
#10 | |
|
Shiro Usagi
Premium Member
Join Date: Sep 1999
Location: Kaneohe, Hawaii
Posts: 34,002
|
Quote:
Cricket
|
|
|
|
|
|
|
#11 |
|
Member (9 bit)
|
Hey cool. Who would have ever thought about going to Micosoft's site to find out, what do they know about Windows and such
|
|
|
|
|
|
#12 |
|
"Normal" again....??
Join Date: Dec 1999
Location: Regina, Saskatchewan, Canada
Posts: 17,601
|
XP is intresting... type CMD at the RUN command, then try COMMAND
__________________
-At Ford, quality is job #1, job #2 is making them explode. ~Norm MacDonald, SNL News -Switching to Glide..Balancing in my head..inside of me... taking the glide path instead. |
|
|
|
|
|
#13 |
|
Forum Administrator
Staff
Premium Member
Join Date: May 2000
Location: Joplin MO
Posts: 41,340
|
Command opens a shell that's compatible with the old Dos command.com - 16 bit with no long file name capability.
|
|
|
|
|
|
#14 |
|
Member (9 bit)
|
That is interesting. Yes, command does appear to work like DOS and CMD seems to be XPs actually command language.
Hey, does XP run DOS programs or DOS games at all? |
|
|
|
|
|
#15 |
|
PCMech: Saving Lives
Join Date: Apr 2004
Location: England, the United Kingdom
Posts: 1,839
|
I play Dizzy (DOS) games on my XP box, and so I assume it can. Whats really interesting that according to the dates on cmd and command, cmd is copyright 1985, yet command is 1990. So newer doesn't seem to be better.
|
|
|
|
|
|
#16 |
|
Member (9 bit)
|
Check again... 1985 to 2001 for cmd.
Wow, so XP does have DOS. Heck it is probably just a DOS shell. We've been had Then again maybe it is time to return to DOS... think how fast you could surf the net and such... http://www.undercoverdesign.com/dosg...et_dos.htm#top and DOS MS Word and DOS Exce run fast on today's computers... |
|
|
|
|
|
#17 |
|
Forum Administrator
Staff
Premium Member
Join Date: May 2000
Location: Joplin MO
Posts: 41,340
|
I got an old DOS custom database program from the 80's written in a language I've never heard of before running in XP - full screen too. Didn't even have to use compatibility mode. It wouldn't run in Win95 - go figure, it hated DOS 7 but ran fine in real DOS 6.22.
|
|
|
|
|
|
#18 |
|
Member (5 bit)
Join Date: Jun 2002
Posts: 19
|
try these !
Navigating DOS
For those who have never used a command line envornment, it can be a little confusing and frustraiting. But don't worry. It's still confusing and frustraiting for people who have been doing it for years. Start by using the DIR command. DIR At the C:\WINDOWS> prompt type DIR for "directory". A list of files should fly up the screen faster than you can read. When the prompt comes up again type DIR/P. This will allow the list to be read one page at a time. Hit enter a few times to get to the end of the list and back to the prompt. DIR is a program that reads scans the current directory and lists all the files. /P is called a switch. The P stands for "page" or "pause"(I can never find out which). When you type DIR/P you are passing /P to the program DIR as a Parameter. You can pass other parameters to DIR. Try typing DIR/W, this puts the file list in "wide" format. Now try this, DIR R*.*. This will display all the files that begin with the letter R. The "*.*" part of the parameter is called a wildcard. A wildcard tells the program that anything after the letter R does not matter. Try this one, DIR *.*EXE. This will display all the files with the .EXE extension. DIR will display all the files, directories, file sizes, time and date or creation. DIR|MORE will show you the list and prompt to continue. Similar to DIR/P. DIR/B for bare or brief, shows only the filenames and their extensions. 8 Character Limits In early systems there was an 8 character limit on file names and directory names. Directory names and file names also could not contain spaces. This scheme still plays a big role in navigating DOS. The standard Windows folder "Program Files" is called "PROGRA~1." The general rule is to count 6 characters in: "PROGRA" then add the ~ and a number. Since we may have multiple files or directories with similar names, we have numbers at the end of the 8 character name. The number is determined by which file or directory was created first. Since Program Files is a built-in directory it gets a 1. If you create a new directory called "Programs" the DOS name will be "PROGRA~2". To view the DOS names, use this command: DIR/X In some Windows versions you can open a DOS prompt in specific directory by first navigating to it through Windows Explorer, then going to Start, Run, CMD or COMMAND. In most cases it will open the default PATH directory. For a full list of DIR possibilities enter DIR/? at the command prompt. Switches In DIR you placed various slashes and letters after the commands. These are "switches" that modify the behavior of a command. Every command has a different set of switches. A "/A" may mean something for a command and something totally different for another. Sometimes a switch may be preceded by a - instead of a /, sometimes there is no special character at all. For each command look at the help file to see the list of valid switches. You may view the help file of any command by typing the command followed by /? or /HELP in older versions. CD (This is what worked on my WinMe system cd\ then C:\>cd windows (no \) C:\>CD progra~1 Now for a different command. Type in CD.. this should set the prompt to "C:\", meaning that you are now in the root directory C:, C:\WINDOWS is a sub-directory of C:. CD stands for "Change Directory", a program that allows you to move around the directory structure. The .. parameter you passed to program CD tells the program to move up one directory level. Now pass a different parameter, type CD C:\WINDOWS\DESKTOP . This will change your directory level to the Desktop folder. Type DIR/P and look at the file listing briefly. Now minimize the DOS window and look at your Windows Desktop. You should see all the same files. Most of the file extensions will be .LNK meaning that they are shortcuts. CD will allow you navigate through the whole directory structure. You may also look at floppy disks: CD A sometimes B: also), or CDROMs: CD D sometimes E . CD.. puts you in the parent directory(up one level) CD. refers to the current directory As stated in the DIR section there is an 8 character limit for directory names for many DOS systems. When using CD to move to a directory with a long name be sure to know the DOS name. Example: CD progra~1 to go to "program files" if you are in the root of C:\, otherwise use CD C:\progra~1 from any other directory. Using drive letters as commands To switch from one drive to another simply type the drive letter. Example: D: or A:. For removable media(floppy, CDROM) you must have the media in the drive to move to it. PATH PATH sets a directory search order. This is useful in many respects. For example, if you are using a boot disk Some installation programs(especially development environments) will add a line to the AUTOEXEC.BAT DOSKEY Type in DOSKEY at the prompt, the DOSKEY program is now loaded. DOSKEY keeps a history of all the commands you type in each session so you can reuse them without typing them in over and over again. You may view your history by hitting the Up-arrow on your keypad. DOSKEY is active in NT by default, but not in Win2K. Consitency is not one of Microsoft's strong points. DEL DEL is the Delete program in DOS. DEL allows you to delete files. For example, typing DEL TEMP.TMP will delete the file temp.tmp. Warning! Using the DEL command in DOS is not like deleting in Windows, there is no Recycle Bin, the files are gone. If you accidentally delete systems files, you are going to have some problems. Only delete files that you are sure about. EDIT At the command prompt type EDIT. The screen should turn blue with a menu bar at the top. This is the DOS EDIT program and it can come in handy. Click on the "File" menu then click "Exit". You should be back at the prompt. With EDIT you can view and alter just about any file on your system, even ones Windows will not allow you to. Warning! Altering system or program files in EDIT can have serious consequences. Make copies of any file you edit and work on the copy so the original remains intact incase you screw up. Believe me, making copies is much easier that reloading your operating system. This time EDIT TEST.TXT this will open the editor and create a text file called "test.txt". Type in some random text. For a moment stop using your mouse. Press <-Alt-> and then the Down-arrow on your key pad. This will dropdown the "File" menu. This is how navigation was done before the mouse. Learning how to use the keyboard for navigation can be useful something goes wrong with your computer or your mouse wont work. Save your work and exit the editor. In some early versions of DOS it was called "EDLIN." If EDIT doesn't work try EDLIN REN REN is short for "rename" and is used to rename files. Warning! Renaming files is as bad as deleting or altering them. Renaming system files can cause errors since the files point to each other. Type in REN TEST.TXT TEST.DOC. This will rename the text file you just created as an MSWord Document. You may now open Word and edit the TEST file like any other Word file. Type REN TEST.DOC MYFILE.DOC. This renames the file as "myfile" but it is still an MSWord document. TYPE TYPE is a program that will show the contents of a file without opening it for editing. Try entering TYPE MYFILE.DOC and you should see the contents of the file you created earlier. MORE Earlier you learned how to use the /p switch with the DIR command. There is another device which allows you to view directories and file contents a page at a time: MORE. Use the previous command to demonstrate. at the prompt enter TYPE MYFILE.DOC |MORE and hit < enter >. If the file you selected it several pages long, DOS will display the first page and then at the bottom of the screen you will see --more--. DOS is waiting for you to continue. Hit < enter > and it will scroll through the next page. EXIT Type this at the prompt to close the current DOS session. FIND This is a very usefull tool for searching files for strings(text). If you have lost a file or renamed a file and cannot remember what the name was, you can use FIND to locate it. For example if your name is Joe and the missing file has your name in it, enter FIND "Joe" at the prompt. DOS will search the current directory for any file containing the string "Joe." MD or MKDIR Use this to create and name your own DOS/Windows directory. MD test, creates a directory named "test" RD or RMDIR Use this to remove directories. RD test MOVE Moves files from one location to another, as opposed to copying. MOVE test.txt A:\, moves the file "test.txt" from the current directory to the A: drive. COPY Copies files. COPY C:\myfile.txt A:\myfile.txt XCOPY "Extended" COPY. Copies files from one or more subdirectories. Slightly more powerful than COPY. XCOPY has all the same functions as COPY but these switches also available: /D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time. /EXCLUDE:file1[+file2][+file3]... Specifies a list of files containing strings. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively. /P Prompts you before creating each destination file. /S Copies directories and subdirectories except empty ones. /E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T. /W Prompts you to press a key before copying. /C Continues copying even if errors occur. /I If destination does not exist and copying more than one file, assumes that destination must be a directory. /Q Does not display file names while copying. /F Displays full source and destination file names while copying. /L Displays files that would be copied. /H Copies hidden and system files also. /R Overwrites read-only files. /T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories. /U Copies only files that already exist in destination. /K Copies attributes. Normal Xcopy will reset read-only attributes. /O Copies file ownership and ACL information. /X Copies file audit settings (implies /O). |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|