During the debugging stability test process, due to the smaller machine C drive, it is necessary to clean up the%tmp% directory and Recycle Bin.
Now my virtual machine's%tmp% directory has 150,000 files , how quickly and effectively delete it? Some of these files refuse to be deleted.
Method 1: Delete the Temp folder directly, it will always scan, and finally will tell you, can not delete, say what other places in use, and I have no;
Method 2: Go to the Temp folder, CTRL + A selects all files for deletion, but the explorer's address bar will always be in the loading process and cannot be deleted;
Method 3: One by one delete? directly without;
Method 4: Make a security guard, computer Butler and so on, using the powder machine, too troublesome, not necessarily can powder;
Method 5: Write a Python script: Shutil.rmtree (Tmppath), but because 150,000 files have a variety of files, some can not be deleted, resulting in the entire cannot delete;
Method 6: Then use the command line to try:rd/s/Q Tmppath, successful ~ ~ can see, refused to delete the file, in the DOS window also has a display, but can automatically jump over, so you can delete all the files can be deleted.
Analyze: Why is rd available?
Personal conjecture: question: Which of the command line and Windows API is closer to the bottom?
From the above results, the command line should be closer to the bottom. The operating system receives the input string, parses it, finds the corresponding instruction, and forwards the request command to the instruction to perform the specific operation.
Welcome to the "Sogou test" public discussion, welcomed the expert pointing ~ ~
Reprint Please specify: Http://blog.csdn.net/sogouauto
Explore test art, Exchange test technology, Welcome to the "Sogou test"
How can I delete large folders quickly and efficiently under the Windows virtual machine environment?