How to remove files ending with '~'
The vim text editor always produce a file ending with a tilde (~) as a kind of backup of the currently modified file (this is a default behaviour). On my MS-Windows machine (Pentium M, 1.73GHz), I was tired of manually deleting these files so I first used the “Search” option in the File Explorer. After some time, I got tired to wait for the results. So I wrote a Python and a batch scripts to find all these files. They are going much faster than the Search GUI. The first time I launch them, they are still going slow (but faster than a GUI). As you can see in the graph below, the second time I launch these scripts, they went at least 10 times faster. I’m not a specialist but I guess it has something to do with caching at the OS level. For the first run, the batch script is 20% slower than the Python script. After that, the Python script is 50% slower than the batch script (but between 3.7s and 5.6s, the difference is not big). ...