Answers to the frequently occurring "not internal or external command, not a program or batch file that can be run" error

Source: Internet
Author: User
Tags clear screen create directory current time split time and date disk usage
This kind of problem is usually the command input error, if yes that is the problem of environment variables Some of the commonly used DOC commands and usage are as follows:

DOS command--dir DOS commands are the most frequently used commands, and DIR is the abbreviation for the English word directory (directory), which is used to display files and subdirectories in a directory. Dir most commonly used two parameters are/p (split screen view),/w (all files are displayed in one screen).


The dir command not only allows you to see what files are in the directory, but also to view information about a file in the directory. --CD CD is an abbreviation for change directory in English and one of the most commonly used commands. As the name implies, if you want to enter a directory, you obviously should use this command. The usage is simple: the CD destination pathname. If you want to return to the previous level of the directory, type cd: Type cd\ three characters to go back to the root directory at once. The purpose of the CD command is that we can go to any directory. We have different functions of the files arranged in different directories, for the convenience of management, but when we want to use a file, we have the directory where the file is located. Usage: Copy the source file destination file.


The main purpose of copying files is two, one is to make a backup of important documents, lest they be deleted and repent; the second is to exchange information between different computers, you can copy your work to a floppy disk, to your boss, colleagues, you can take it home. --del del is the abbreviation for delete (delete), obviously it is "dry destroy" delete file. To delete a file in the current directory, enter the Del Space and the file name. To delete a class of files, you can use wildcard characters. For example del *.tmp, is to remove all files that have the TMP extension.


You can also delete all the files in the current directory, the command is simple: del * * or Del. The--ren and type ren (rename) commands. The format of the Ren command is: The file name of the Ren source file. The format of the type command is: Type file name.


The type command is the way to view files in Notepad. --format is the format command, Format command is simple: Format A, that is format a:, format B, that is format B:.


The format command removes all files on the disk. --chkdsk CHKDSK is the abbreviation of check disk, which is used to check the usage of your disks. The chkdsk command is in the format: CHKDSK disk name--path at the DOS prompt, if we are going to execute an executable file, the computer will look for this file on disk, and if it is not specially processed, itLook in the current directory only, if not found, the prompt error. To solve this problem, DOS provides a path command that, if a directory is defined in the path command, you can execute the files in the directory specified in path directly from anywhere. The format of the path command is simple: The path directory name, if there are many directories, is used in the middle, (do not remember the wrong, the semicolon is not a comma) separated. To add a new directory, add one after the last directory; 


You can then enter a new directory name. --md and RD Two commands are directory operations, MD (make directory--Create directory) and RD (remove directory--Delete directory). But use Rd to note: 1. The folder you want to delete cannot have child files and subfolders 2.


The current folder cannot be deleted.


--copy copy in English is a copy of the meaning, so-called replication is the original document has not changed, re-produced a content and the original file without any differences in the file.


The----Edit command is a simple editing software under DOS that uses it to edit some programs and batch files. Ver display operating system version set display system Variable Vol display specified disk volume label DOS Common Commands 2 CLS clear screen (where applicable) screen is too messy, or garbled on the screen, clear the screen display content but does not affect the computer Department any information (usage)cls Enter move move file, change directory name (where applicable) move file to other directory (usage)move [filename] [directory] move file to new directory Name] [directory name] Change directory name (example)c:\>move c:\autoexec.bat C:\old move Autoexec.bat file to old directory C:\>move C : \config.sys C:\temp Mobile Config.sys file to old directory CLS split screen display (where applicable) when the output of a lot of one screen display, almost all commands, especially the type Useful.

When using more, the disk cannot be write-protected or suitable for the optical drive. (Usage)type [file name] |

        More split screen display file contentsMore < [file name] Split screen display file contents (example)c:\>type msdos.w40 | More xcopy copy directories and files (where applicable) are useful for copying along with subdirectories, much faster than copy commands when copying a large number of files (usage)xcopy [filename] [directory] copies the specified file to the specified target xcopy [Source directory] [destination directory] The source directory to the destination directory, xcopy * * [directory]/s copy files and non-empty directories to the specified directory other common parameters are: v copy after verification, the shadow


The sound speed E is similar to S, but it is copied even if the subdirectory is empty. Help (where applicable) use when you want to know exactly how DOS commands are used (use)HELP to provide all DOS commands to help the Help [DOS command] Provide Help attrib setting file properties (where applicable) when you want to do a special processing of a file (use)attrib to display the properties of all files attrib +r or-r [file name] Sets whether the file property is read-only Attri b +h or-H [file name] Sets whether the file property is suppressed attrib +s or-s [FileName] Setting file property is System file attrib +a or-a [file name] Setting file property is archive file attr IB/S setting file attributes including subdirectories files date display and modification date (where applicable) want to know or modify the time and date (usage)date display and change the current date lable set the volume label (that is, the partition name) (for the occasion) 
        To mark the disk (usage)label displays the disk volume label, [Drive letter] [volume label name] Sets the volume label of the specified disk defrag disk defragmentation (where applicable) the disk reads and writes many times, or the disk is used for a long time, you may need to use this command Defragment the disk. Disk fragmentation does not mean that the disk is broken, but only byAfter multiple copies and deletions of files, disk usage can be very inconsistent, resulting in slower speeds. Doskey calling and building DOS macros (where applicable) is often useful when you need to enter duplicate commands (usage)doskey will doskey memory, open buffers, and later commands will be saved in the buffer.

        You can call DOSKEY [Macro command name]=[command name] at any time to define the macro command as a command, and then enter the Macro command, the computer will execute the corresponding command doskey/reinstall reinstall Doskey Doskey/bufsize= set the size of the buffer Doskey/macros Show all Doskey macros Doskey/history Show all the life in memory Make Doskey/insert|overstrike set whether the newly typed character overwrites the old character (example)c:\>doskeyc:\>dir c:\>copy C:\te
        Mp\*.* A:c:\>del c:\temp\*.* c:\>copy b:\*.* c:\temp The above four commands have been saved, with the cursor control keys can be selected in turn to use or Modify, or you can use the F7 key to list all saved commands C:\>doskey Di=dir/w/p define di as the macro command, which means to perform dir/w/p fdisk hard disk partition (recommended) only if the hard disk is infected by a very good virus, or A new hard disk needs to be partitioned, it is best to ask knowledgeable people to guide.

Hard disk must be low-level format, partition, format three steps to use, the finished computer's hard disk has been done in these processing. Enter Fdisk and press ENTER to enter the prompt interface prompt setup prompt (where applicable) when you are tired of the c:\> prompt or you want to make your cue special, you can try it, very interesting DOS command, can display time and

Date. (Usage)promPT $p $g with the current directory name and >, which is the most commonly used prompt prompt $t represents the time prompt $d represents the date prompt $$ represents the prompt $q represents =        Prompt $v represents the current version prompt $l representation < prompt $b Representation |

        Prompt $h represents a prompt $e represents the character that ESC represents prompt $_ represents a carriage return (example)c:\dos>prompt Wang$g takes wang> as a prompt    Wang>prompt $t $d$g use time, date and > as a prompt 0:01:07.77thu 08-29-1996>prompt $p $gc:\dos> Times Display and modification time (where applicable) for display and modification times, using the same date(example)c:\dos>timecurrent time is 12:15:26.04a Enter NEW:  11:20:20.00p on time: Enter the times in sequence, plus the afternoon (a/p) You can simply press the ENTER key to ignore

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.