Home > Article > System Tutorial > Basic operation method of deleting files in WIN7 batch process
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.
Change the .txt suffix of the text document to .cmd or .bat, for example, change [New Text Document.txt] to [test.bat].
Click OK in the pop-up dialog box.
Right-click test.bat and click Edit in the pop-up menu.
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:
Copy the test.bat file to the folder you want to process.
After double-clicking the test.bat file, all txt files in this folder were deleted.
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!