Navigating the command prompt, as well as changing drives and directories is important skill to have. To do this, you must learn a few commands that you must enter into the command prompt
Navigating in the commandprompt is extremely simple. Remember to open your command prompt before trying to use this guide.Changing directories
Changing directories (or changing your path) in the command prompt makes use of the CD command. The CD command has a small amount of possible arguments. CD accepts a drive and a path. For example, the command "CD C:\WINDOWS\system32" changes the directory to the system32 folder on the C drive. The letter C followed by a colon is the drive identifier followed by a separator respectively. All that comes after the colon is a path.
The CD command is relative to the directory you are already in, so you can navigate backwards to the parent folder. After entering "CD C:\WINDOWS\system32", you should be in the system32 folder. To reach the parent folder, WINDOWS, you can use the command "CD ..". You can also navigate to the root of the drive by using the command "CD \".
In the case that your desired folder or path has a space within it, you can encapsulate it in quotation marks.
If your drive/path combination is to a different drive than you are currently in, you need to add the /D argument to the CD command. For example, if I was currently in the A drive, and I wanted to go to navigate to C:\WINDOWS\system32, I would use "CD /D C:\WINDOWS\system32".Listing directories
Directory and file listing and ordering can be done with the DIR command. Like the CD command, the DIR command is relative to the directory it is in and can also take paths. For instance, if I would like a list of all of the folders in C:\WINDOWS and I was currently in C:\WINDOWS\system32 I could enter "DIR "../"".
Results can also be listed using various order schemes. To change the way DIR orders the output, add the /O argument to it. The /O argument needs to be followed by a colon and a sortorder type. The available types are by name (n), by extension (e), directories listed first (g), by size (s) and by date/time (d). Using - as a prefix to one of the types reverses the output order. If I wanted to display all of the files and directories in the folder I was currently in using reverse alphabetical ordering, I could type "DIR /O:-n".
7.03.2009
Command Prompt Navigation, Directories and Drives
5.20.2009
Using traceroute in command prompt
Traceroute is a valuable tool when trying debug your internet or lan connection and for seeing what your computer may connect to on its way to remote webservers. It also has many other purposes.
Traceroute (used in windows) comes in two forms currently. Both forms can be utilized through the command prompt. First, you need to open up the command prompt. After opening, you can access either version of traceroute by using the command tracert (for IPv4) and tracert6 (for IPv6). Both function similarly, and if you are unsure of which to use, IPv4 is probably the one you need to use.
By default, traceroute only needs one argument to display data. Traceroute requires that you give it an ip address or a domain name (i.e. your destination). For example, for me to use traceroute to see what my information goes through to get to google, I would type "tracert www.google.com" into the command prompt. The commandprompt will start spitting out data about your connections as it is recieved, so it may take some time.
Both versions of traceroute support other arguments. One of the most useful of them is the timeout argument, represented by -w. If you are performing a traceroute and certain devices are taking a long time to respond, you can filter them out using a timeout. For example, if you set the time out to 3000 miliseconds and if a host does not respond in 3 seconds, your computer will ignore that host, speeding up your tracert. If I want to see all of my computer network's relays to google, but timeout when responses take over 2 seconds, I would use the following command: "tracert -w 2000 www.google.com".
In addition to that, another useful parameter is the -h (hops) limit. It will limit tracert to a certain number of hops before it stops trying to reach the target. For example, if I only need the first 3 hops in my previous tracert to google, I could add in "-h 3". The final result would be "tracert -h 3 -w 2000 www.google.com".
Remember, if you are having internet connection issues or problems, you can probably find a 'missing link' or a slow responding host using the traceroute command in the command prompt.
5.16.2009
Making command prompt fullscreen easily
It is pretty easy to make your command prompt window fullscreen. With these few simple steps, the commandprompt will overtake your screen.
Making the command prompt full screen is really simple. In fact, it does not even require a post on it's own nor any codes, but I am doing it for the sake of organization.
There are two ways to make the command prompt fullscreen. The first (and most popular way) is to press alt (right or left alt, doesn't matter) and enter simultaneously. Please note the cmd window must be open at the time, or it will not work. The second way is to open a command prompt window. Upon opening the window, right click on the action bar above the window and select properties. A dialog box should appear on your screen above the command prompt. In the Display Options box, there are two options, Window and Full Screen. Click on full screen and then hit Ok. The console window should be full screen.
To exit fullscreen mode, simply press alt and enter simultaneously. In addition, any event that happens outside of the command prompt may cause it to go back to windowed mode.
How to open up the command prompt many ways
Opening up the commandprompt is alot simpler than you think, and there are many ways to do it. Opening the command prompt is as easy as 1, 2, 3!
1. The most common method to open the command prompt is to go click start (at the bottom of your screen in the task bar). After, click on "run...". Finally, type "cmd" into the box and press on the OK button. A black box, also known as the console will open.
2. Press on the windows button and the R key simultaneously. Then, type "cmd" in the textbox and hit enter.
3. Open up a new notepad document and type "command.com" (without the quotes) into the white space. Save it as a batch file (meaning, save the file as something.bat). Locate the file and double click on it.
4. Click on start. Then, proceed to click programs (or all programs) and then accessories. Under that list you should find the command prompt.
CMD code to display all files on your computer
So you have a computer full of files, and you would like to see a comprehensive list of files all at once? Well, you have to have a windows computer for this to work. Open up command prompt. To list all the folders that aren't hidden on your computer, type in TREE and press enter (this only works for the drive that you are currently on). Now, to save this list to your computer, all you have to do is type in "tree > nameoffile.txt" (without quotes). This will create a new file called nameoffile.txt in the directory your commandprompt is currently working in. This file contains the output that the TREE command would normally give you. To list all of the files along with folders, all you have to do is add /f to the end of your tree command. For example, to save all files and folder's names on your computer to testfile.txt, I would type "tree /f > nameoffile.txt" into the command prompt, ommitting quotes. Also, to make the output of the tree feature more computer more text file friendly, we could add the /a argument to the end of the command just like we did with /f. /a makes all output ASCII. To list all files on my computer in a ttext file named mytextfile.txt with ASCII characters, I would put "tree /a /f > mytextfile.txt" into the command prompt.