Basics of windows command prompt




















You can use any one of the methods to open the command prompt both will work. Once you have opened it will look something like this. You can see the diagram below this is the folder tree on which I will work in this tutorial.

And whatever I will teach you, same I will apply to this folder tree. Type cd in the command prompt, it will list the present working directory of your computer. It means in which directory you are currently working. It is very important to know because after getting this information you will be able to decide in which directory you want to go. Once you have checked in which folder or directory you are. You can also get the list of folders inside the folder.

You see in the figures I have a total of 19 directories in the Desktop directory and also test1 and test2 are also present.

In my case I want to go into the test1 folder then I will simply type cd test1 and press enter. After doing all the above steps as you know I am currently in the test1 folder and I again want to go back in the Desktop directory the how can I achieve this?

There is a very special concept of an absolute pathname and relative pathname,.. At this time I want to open the test2 folder, then I will simply type start. Since I am in the test2 folder, therefore, my current directory is test2 and it will open it.

Suppose I want to make a folder demo in the test2 folder, if you are reading this article from start then you know I am currently in the test2 folder. Some of them are files, like HelloWorld. Others are directories, like introcs. The following command creates a directory named hello , which you can use to to store all of your files associated with the Hello World assignment. To access the two files, change directories with the cd command. Then use the dir command to see what is in this new directory.

Simply specify a new filename instead of a directory name. Suppose you accidentally messed up the upper and lower case and had saved HelloWorld.

Use two move commands to fix it. The following command creates a backup copy of our HelloWorld. This is especially useful when you modify a working program, but might want to revert back to the original version if your modifications don't succeed. The del command deletes a file. When you submit your program be careful to submit HelloWorld. As mentioned earlier, you can check this by looking at the folder that appears to the left of your current command. To change your current location, use cd short for change directory followed by the folder you want to visit.

So for example, to move to your Desktop folder from your default user folder, you would type cd Desktop. And to move up one folder, use the cd.. Use mkdir [new folder name] make directory to create a new folder. For instance, mkdir Awesome Pics will make a folder called Awesome Pics. Similarly, rmdir [folder name] remove directory will delete a folder, but only if it's empty.

To delete a file, use del [file name]. If there's too much clutter on the Command Prompt's screen, type cls to clear the contents and start fresh. Some of the most useful Command Prompt commands deal with networking. Commands like ping let you see if your computer can reach a remote destination and how long it takes.

Meanwhile, ipconfig lets you see the network overview for your current connection. Learning about CMD commands for managing networks is thus a great use of the tool. Now you're familiar with the basics of the Command Prompt, even if you've never used it before. Some tasks, like managing files and folders, will probably feel clunky in the command line if you're used to doing these with the GUI. But for other tasks, like checking your IP address, running a quick CMD command is much more convenient than clicking through a bunch of menus.

Sets the path in which files will be searched for. Changes attributes of specified files. Displays and changes the encryption status of files and directories on NTFS partitions. Compares the content of two files or two file sets. Displays and changes the compression status of files and directories on NTFS partitions. Copies a file or multiple files to another location. Runs scripts over the Microsoft Script Host. Deletes a file or multiple files. Deletes a directory as well as all subdirectories and files within.

Compresses files without any loss command has the same function as makecab. Ends the valid range of changes to batch files or scripts. Extracts files and folders stored in CAB files. Extracts files and folders stored in CAB files in new Windows versions use expand. Compares two individual files or two sets of files with one another and displays the differences. Sets a specific command that should be run for each individual file in a file set.

Selects one or more files and runs a command that refers to these files. Specifies a program for opening a specific file type. Skips the execution within a batch program to a specific line marker. Represents a conditional statement and executes expressions within batch files only under certain conditions. Compresses files without loss in CAB format you can also use the diantz command.

Creates a symbolic link to a file. Moves a file or multiple files from one directory to another. Displays and separates open system files and folders. Restores readable files that were on a defective data drive. Changes the name of a particular file. Replaces the selected file or files with one or more other files. Allows so-called robust file copying. Manages media on removable storage devices.

Limits the valid range of changes to batch files or scripts. Starts the WinSxs Tracing Utility, a tool for programming diagnostics. Restores administrator access rights to a file that have been lost when reassigning a user. When enabled, checks whether files are written correctly on a data drive. Finds files that match a particular search topic. Copies files and entire directory structures. Starts commands and programs at a particular time.

Creates backups of files. Allows users to make changes to start configuration data storage the command is a new version of bootcfq. Prepares a hard drive for BitLocker Drive Encryption. Creates, edits, or displays the content of boot. Edits and displays the access control list. Changes or displays the data driver check at startup. Changes the standard input and output for the system. Creates or configures compresses drives a newer version of the command is called drvspace.

Defragments all or only specified drives. Manages, creates, and deletes partitions from the hard drive. Allows users to remotely control the disk performance counter. Creates or configures compressed drives. Manages databases within the extensible storage engine. Creates an entry ID and message in an event log. Creates, deletes, and manages partitions on the hard drive. Allows users to manage and display filter drivers. Installs additional Windows features.

Formats a drive to the file system specified by the user. Provides numerous features related to the file system, such as disk removal. Compiles self-created dictionaries for handwriting recognition. Installs a compiled dictionary for handwriting recognition. Loads a program into the high memory area UMB — has the same function as loadhigh.

Locks a drive so that only a user-selected program can access it directly. Updates all registry entries that have to do with performance indicators. Creates and manages event trace sessions and performance logs. Configures drive encryption with BitLocker. Displays information about the RAM and indicates which programs are currently loaded in it.

Creates and deletes mount points for drives and displays them. Starts Microsoft Backup replaces backup and restores. Starts the program Microsoft Diagnostics, with which system information can be displayed. Starts the Windows installer, with which Windows can be installed and configured. Starts an automatic setup process for the multilingual user interface MUI. Installs the minimal operating system Microsoft Windows PE. Recognizes floating point division errors in Pentium chips, starts floating point emulation, and disables floating point hardware.

Installs, uninstalls, and configures packages and functions for Windows. Installs plug-and-play devices from the command prompt. Uses the IDLE status of a processor to reduce energy consumption.

Provides information on the currently logged-in users. Configures the Windows recovery environment, with which you can repair the installation of the operating system. Creates a user-defined Windows image to restore the system. Manages the registry of the command prompt. Registers a common information model provider CIM provider in Windows. Creates new performance indicator protocols from the data in the existing protocols.

Repairs and decrypts defective drives that are encrypted with BitLocker. Resets a session. Restores backups that were created with the backup command replaced by msbackup. Manages services by connecting to the Service Controller. Repairs the registry and allows a backup to be created of it. Analyzes the security settings by comparing the current configurations with templates. Creates or changes environmental variable in the user of system environment.

Checks all important and protected system files. Displays information about the Windows installation, including all installed service packages. Creates and deletes TPM virtual smart cards. Processes logs or real-time data generated during the tracing of computer programs. Displays performance counter data or writes it into a file.



0コメント

  • 1000 / 1000