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

2.1.1 basic batch command xcopy move del md

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Automatic backup of the application of Windows command line batcmd script remote backup of tourist flag, introduction of Mo (Sun Zhong)

2.1.1 basic batch command xcopy move del md

Automatic backup of the application of Windows command line batcmd script remote backup

Course address: http://edu.51cto.com/course/15056.html

Windows Command Line bat/cmd batch script Writing Application File Management Application

Related tutorial: http://edu.51cto.com/course/11343.html

Command: xcopy

Parameter: / y if there is a duplicate name, overwrite it directly and do not prompt

/ s copy non-empty directories and subdirectories

/ e copy files and subdirectories, including empty directories

/ d if there is a duplicate name, compare the retention time with the new one

Usage: xcopy [parameter] [source path] [destination path]

For example: copy the files in folder A to folder B.

Xcopy / y "A*"B\"

Command: move

Usage: move [source path] [destination path]

Example: move the files in folder A to folder B.

Move "A *"B\"

Move folder A to folder B

Command: del

Parameter: / S Delete files including subfolders

Delete / Q directly, don't prompt

Usage: del [parameter] [source path] [destination path]

For example: delete all the contents of folder A, including files under subfolders.

Del / s / Q "A\"

Command: rd

Parameter: / S delete includes subfolders

Delete / Q directly, don't prompt

For example: delete folder An and subfolders

Rd / s / Q "A\"

Command: md

Usage: md [folder name]

Example: create a folder named "date"

Md date

Parameter: system date: date

System time: time

Example: create a folder named by date and time

Set "backname=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%"

Md backname%

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