-
1. Create a new folder on the computer, create a new "txt" file, and name it.
2. Right-click and set the file suffix to ".".bat。
3. Create a new folder and file as an example listed.
4. Right-click to open the file, and enter "del q a f c: users administrator desktop to create a new folder a *."as a command line.
5. Enter "pause" in the second line as the command to pause the display.
6. After saving, double-click the bat file to delete all files in the target path.
-
1. Write a BAT batch file. Among them, rem can be removed, and it is kept here to facilitate the execution effect.
2. Then, drag and drop the text file that contains the files you want to delete onto the batch file, and the batch will run and delete all the files listed in it successfully.
3. The following is an introduction to a key point. First, we use the "%1" system variable, which gets the full path to the drag-and-drop file.
4. Then type %1 is to output the content of the text file into a string for the use of the for f command.
5. In addition, "Cong Fanchang tokens=1*" is used in batch processing, mainly to investigate that some file paths contain space, and the file path can be completely obtained with the "%%i %%j" infiltration behind.
6. At the same time, use double quotation marks to enclose %%i %%j in the command to ensure that the del command can correctly identify the file name with spaces, otherwise it will report the error that the file cannot be found.
7. If the batch process reads the file path, the middle car in the path is garbled, then you can save the txt file and make sure that the encoding is selected "asni".
-
The dos command is easy to delete all files in a folder. There's not even a need for batch processing. x0d x0a, but the batch of dos commands cannot be "regular".
bat or. cmd file. x0d x0a3, use Scheduled Tasks in the Control Panel to set a time to run this batch file.
The cmd file is placed in the "Startup" item in the start menu. This way, it will be executed every time the device is turned on.
echo off
taskkill /f /t /im >>>More
attrib c: windows system32 +h, pay attention to the spaces. >>>More
echo off
del C: Windows System32 adds this batch to the startup of the menu. >>>More
First, open your D drive first.
Fourth, on the top of the file right - rename. >>>More
The materials we need to prepare are: computer, folder or file to be deleted. >>>More