Welcome to Dream.In.Code
Getting Help is Easy!

Join 117,542 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,699 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Basic DOS operations

 
Reply to this topicStart new topic

> Basic DOS operations, for the beginner

ferrari12508
Group Icon



post 28 Mar, 2008 - 05:32 PM
Post #1


This tutorial will be a basis on how to operate DOS so that you can look around your computer and open programs an alternative way. Lets say your mouse is broken, how are you ever going to double click that icon? Well the great thing about the command prompt(a.k.a. cmd) is that it works without a mouse. Simple commands allow you to "view" a folder's content and you can even specify what type of file to view.

Any time Quotations are used in this tutorial, they are not meant to be typed into the command prompt.hmmm.gif

I'm going to start out with the Dir command as it is a simple command, but if you don't know what certain folders are named or are helping a friend on his computer, it can be quite powerful.

The Dir command simple stands for directory and it outputs the files and folders in the root folder or the folder you are looking in.

Below is a picture of the command prompt.

IPB Image

The writing on your command prompt may be different than mine, but the commands do not change. If I type in "dir" without the quotations I will get a nifty list of all the folders and files in the directory folder.

IPB Image

So in the Brian folder, there are 6 other directories and 2 files. notice how one of the files ends in ".pref" If i were type in "dir *.pref" the only item that would come back to my inquiry would be that one file. The "*.pref" Than the only files that would show up would be files that end in ".pref". This can be used for documents of any type including word documents(.doc), text files(.txt), powerpoint presentations(.ppt), and others. The * in "*.pref" is a wild card. The wild cards that can be used are ?, #, and *. * is used for any string. Two examples are "*.doc" and "name.*". The latter of the two would show any file type that was named "name". The ? is used for letters, so ???? could mean "name" or "cool". the # is self explanatory seeing as it represents a number. All of these symbols can be used interchangeably in the 2 examples I used with the astrisks.

IPB Image

The next command that I would like to enlighten you, the reader, on is the CD command. CD just like Dir means something, Change Directory. This command allows you to navigate around your computer using CMD. CD is very simple, just like dir. All you need to do is type "cd "Folder Name"". Folder Name would be where you put in the name of the folder such as Documents and Settings.

IPB Image

Using that, I was able to move into the documents and settings folder, but what if I didnt want to go into that folder, but i did by accident? Well it would suck to have to start all over if you were 20 folders into something, so you can just use the command "cd.." which will move you up one directory.

IPB Image

If you are a few folders in and just want to go to the root folder, you can just type "cd \". Also if you are in the C: drive but need to be in the D: drive, you can just type "D:"

IPB Image

This can come in quite handy as soon you will learn where things are on your computer's hard drive and you might speed up your productivity rate when using a computer. wink2.gif
Go to the top of the page
+Quote Post


Register to Make This Ad Go Away!


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 10/7/08 05:38PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month