Baiyun One button Reassembly System 2024 The easiest and easy to use system reinstallation software Exclusive technology of the whole network/support GPT-UEFI one button installation Perfect compatibility with all motherboards on the market Support the installation of Windows XP/7/8/10/11 system

Current location: homepage > System Tutorial >Win10 Batch Delete File cmd Code Writing | How to batch delete files in a folder

Win10 Batch Delete File cmd Code Writing | How to batch delete files in a folder

2019-11-26 14:15:41 Classification: help
Some users may ask why they use code to delete files in batches when there are so many third-party tools that are not used in the market? This is because the code written by oneself can delete files, which is more executable, but it is necessary to understand the code. This article is Baiyun one button reinstallation system This is a simple method of writing a cmd file to delete files in batches. Interested users can learn about it.

Method/step:

1. Right click in the blank area of the desktop, and select New Notepad File from the menu item that opens. The name can be taken at will. Here, it is named Batch Delete File.txt;


 Batch delete files, delete file command steps

2. Modify the file suffix to. cmd or. bat, rename other suffixes, and a prompt window will pop up according to the convention. If you change the file extension, the file may become unavailable. Are you sure you want to change? Click Yes directly;

 Batch delete files, delete file command steps

The icons displayed on the desktop are different for different suffixes;

 Batch delete files, delete file command steps

3. Right click Batch delete the file. cmd. In the open menu item, select Edit;

 Batch delete files, delete file command steps

4. After opening the file, enter the following code:

@echo on

for /r %%f in (*txt) do del %%f

Please note that the file name you want to delete is entered in parentheses. If you want to delete all notepad files here, enter txt;


 Batch delete files, delete file command steps

5. Put this file in a pile of folders that need to be deleted. This folder may contain many different files;

 Batch delete files, delete file command steps

Double click the batch delete file. cmd to run. As shown in the previous example, there are files with the txt suffix and the jpg suffix under the folder. After execution, only files with the jpg suffix remain, which is to achieve the desired effect;

 Batch delete files, delete file command steps

That's it Win10 Batch Delete File cmd Code Writing | How to batch delete file articles in a folder If the method of this article can help you, then collect the Baiyun one click reinstallation system website, where you will occasionally share common installation fault solutions.
 Reinstall System Help
 USB flash drive system
 Youbaiyun USB flash disk system

contact us | About us | Site Map | Baiyun one key reinstallation system QQ group

provide One click reinstallation of system win7 Ultimate, One click reinstallation of xp system , and reinstall win10 Professional Reinstall system software as well as System reassembly Related tutorials for
Copyright@2019-2024 Baiyun system copyright. All Rights Reserved. Record No.: Yue ICP Bei No. 20000429
The only website of Baiyun one click reinstallation system: www.baiyunxitong.com