Common DOS commands and commands for handling files

Source: Internet
Author: User
Tags create directory

Common DOS commands and commands for handling files

1. Common DOS commands

Drive letter: Enter the specified drive letter.

Dir lists the files and folders in the current directory

MD Create Directory

RD Delete Directory Note: Rd cannot delete non-empty folders, and can only be used to delete folders.

CD into the specified directory

CD: Go back to the top level directory

CD \ Go back to the root directory

echo "Hello java" >a.txt writing text to the specified file

Type a.txt display file contents command

Del Delete file Note: You cannot delete a folder, only files can be deleted.

Exit launches DOS command line

CLS notifies the computer to empty the current command

* is a wildcard character.

tab command completion.

the arrow keys are up and down to retrieve the last command you wrote.

2. Commands for common batch files

Echo indicates the character that appears after this command

Tiltle sets the caption of the window.

echo off indicates that all running commands do not display the command line itself after this statement  

Color sets the font color for the form.

   @ with the echo off , but it is added at the front of each command line, indicating that the runtime does not display this line of command line (only affects the current row).  

Pause running this sentence pauses the execution of the batch and displays it on the screen Press any key to continue ... prompt, waiting for the user to press any key to continue  

REM The word identifier after this command is interpreted as a line (note), not executed, but for future reference (equivalent to comments in the program) or % the content of the comment %

%[1-9] represents a parameter, which is a space after the file name is added when the batch file is run (or Tab ) Delimited string






Common DOS commands and commands for handling files

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.