Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Getting started with BAT scripting-Common commands

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Common commands in command window

1. Cd command

Cd / / displays the current directory cd.. / / exit to the previous directory cd / d D: / / enter the directory where the last D disk is located, cd / d d:\ / / enter the root directory of D disk cd / d D:\ test / / enter the test directory under D disk

2. Md: create a new folder

Md D:\ test / / create a test folder under disk D md test1 test2 / / create test1 and test2 folders under the current directory

3. Dir: displays the contents of the directory

Dir / / displays folders and files in the current directory dir / b / / displays only the file names of the current directory dir / p / / pagination shows the contents of the files in the current directory dir / ad / / shows the folder in the current directory dir / a murd / / shows the current directory The file in the record dir C:\ windows / / display the contents under disk c windows dir test.txt / / display the current directory to find that test.txt information dir / S / / Recursive display the contents of the current directory dir test* / / shows the files and folders under the current directory that begin with test The dir / AH / OS / / value shows hidden files and directories in the current directory. And sort by file size from small to large

4. Rd: delete a directory

Rd test / / Delete the empty test folder under the current directory rd / s / Q d:\ test / / use quiet mode to delete d:\ test (in addition to the directory itself, delete all subdirectories and files under the oyster)

5. Ren: rename a file or directory

Ren test.txt sample.bat / / rename the test.txt file in the current directory to sample.bat ren c:\ test test02 / / rename the test file on disk c to test02

6. Tree: displays the directory structure

Tree D:\ test / / displays the directory structure of the d disk test

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report