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

What are the common commands for Dos batch processing

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Today, I will talk to you about what Dos batch processing commands are commonly used, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.

Pause

Pause command

Find

Search for a file or a specified string within a file

Prompt

Set command prompt

Ren

Batch duplicate name

Usage: ren 1.txt 2.bat

Effect: 1.txt is changed to 2.bat

Subst s:\\ *. *\ c$ (this is a remote mapping)

\\ *. * Map the windows under disk c to disk s

If deleted, yes.

This is a use example: subst s: / d

Regedit / s

Usage: regedit / s 1.reg

Run all registry files in a batch without displaying

Assoc

Modify file association

Dir

View this directory file

Dir / s / p "* .txt"

Show all txt files on the current disk

Rd

Delete directory

"rd / s" is to delete everything in the directory.

Rd / s 123 deletes everything in directory 123

Del

Delete a file

Example: del / f F:\ xx

Effect: delete the xx file under the F disk

Type

View file contents commands such as * .txt

Attrib

Change file properties command

Move

The cut command "move 1.bat 123" 1.bat file is cut to directory 123.

Format

Format command "format d:\ Q"

Chkdsk

Check the disk

Path

Path=c:\ dos;c:\ win

Search for the current executable program

Copy

Copy file command such as: "copy 1.txt 2" is 1 file is copied to 2 folder copy cannot copy directory

Copy cmd.exe\\ 192.168.1.102\ c$

Copy cmd to 192.168.1.102 under disk

Xcopy

The advanced copy command "xcopy aaa A123 / e" copies the aaa directory to the 123 directory

Title

Change the cmd title command such as "title" title to.

Color

Change background parameters such as "color 07" is black background white word "color 12" is blue background green word see color /?

Defrag

Disk defragmentation "defrag c:-a" analyzes the fragments of disk C without processing "defrag c:-f"

Ipconfig

View native ip address command

CLS

Clear the screen

Tree

Show all current file folders and structures

Call

Running another batch does not end the parent process

Mstsc

Remote Desktop connection

Ping computer name

Get ip for computer name

The return TTL value of ping confirms the operating system

The TTL value of xp/2000 is 128.

Windwos98 is 64

Unix is 255,

Ping / n 3 127.0.0.0 > nul

Send 3 times to ip, 6 seconds later

Date

Shows that the current date has no time now.

TIME

Show the current time when the time will not be updated

Taskkill

End the process

Tasklist

View the process

Goodbye to echo & pause > nul

At the end, instead of asking for any key to end, good-bye can be written freely in the good-bye, and you can also remove "echo good-bye &" and nothing will be shown.

Shutdown

Shutdown command

Start

Open a program or folder

Sc config enables service types

Sc config Service name start= demand / / Manual

Sc condig service name start= auto / / automatic

Sc config service name start= disabled / / disabled

For example, you want to open a disabled telnet service

Sc config telnet start= auto, error:

[SC] OpenService FAILED 1060

Because the service name of telnet is not telnet but tlntsvr, sc config tlntsvr start= auto is OK.

Mode con

Displays the length and width of the command prompt

Mode con cols=113 lines=15

Height is 15, width is 113.

Nslookup

Check how much the local dns service is

Start

Open something in 32-bit color

After reading the above, do you have any further understanding of the common Dos batch commands? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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

Development

Wechat

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

12
Report