Home > System Tutorial > Windows Series > Basic operation method of deleting files in WIN7 batch process

Basic operation method of deleting files in WIN7 batch process

WBOY
Release: 2024-04-24 11:07:26
forward
780 people have browsed it

Want to use batch commands to delete files in WIN7 system, but don’t know how to do it? Don't worry, PHP editor Xinyi will explain in detail the basic operation process of deleting files in WIN7 batch process. This tutorial will guide you step by step on how to use batch commands to effectively delete specified directories or files. Continue reading the following content to learn how to skillfully operate batch deletion of files in WIN7 system.

Right-click to open the right-click menu and create a new text document.

Basic operation method of deleting files in WIN7 batch process

Change the .txt suffix of the text document to .cmd or .bat, for example, change [New Text Document.txt] to [test.bat].

Basic operation method of deleting files in WIN7 batch process

Click OK in the pop-up dialog box.

Basic operation method of deleting files in WIN7 batch process

Right-click test.bat and click Edit in the pop-up menu.

Basic operation method of deleting files in WIN7 batch process

Then enter the following command (for example, to delete all txt files in the folder).

@echo on

for /r %%f in (*.htm) do del %%f

Ctrl S to save; as shown in the picture:

Basic operation method of deleting files in WIN7 batch process

Copy the test.bat file to the folder you want to process.

Basic operation method of deleting files in WIN7 batch process

After double-clicking the test.bat file, all txt files in this folder were deleted.

Basic operation method of deleting files in WIN7 batch process

The above is the detailed content of Basic operation method of deleting files in WIN7 batch process. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:zol.com.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template