Deleting large folders or collection of files on Windows may take quite some time. The deletion speed depends on a number of factors but even if you have a super fast computer, you may notice that it takes minutes or even hours to delete all selected files.
If you use the command line, you can delete large folders faster in Windows. If you want to speed up that even further, third-party tool byenow may be an option.
The program uses multiple threads to delete the contents of a selected folder quicker and advanced users may select to use the NtDeleteFile API instead of the standard DeleteFile API to reduce the number of syscalls from three to one to speed things up further.
How much faster is byenow? The developer estimates that the application speeds up the deletion by the factor 2 when compared to the fastest option using rmdir. Performance differs depending on numerous factors including storage device, processor and load, size of folder and files, and type of files.
For network shares, a speed increase by the factor 2 is “all but guaranteed” according to the developer because of network latency playing a role in the process.
Windows users may download the most recent version of byenow from the developer website. It is provided as an archive that includes 32-bit and 64-bit versions of the application.
All it takes after extraction is to run the tool from the command line. A good start is to run byenow /? to get the help text that includes all parameters that the application supports.
Microsoft Windows [Version 10.0.18363.657]
(c) 2019 Microsoft Corporation. All rights reserved.
Faster folder deleter, ver 0.2, freeware, https://iobureau.com/byenow
Syntax: byenow.exe [options] <folder>
Deletes a folder. Similar to ‘rmdir /s …’, but multi-threaded.
-p –preview enumerate contents, but don’t delete anything
-s –staged enumerate contents first, then delete them
-1 –one-liner show progress as a single line
-e –list-errors list all errors upon completion
-y –yes don’t ask to confirm the deletion
-t –thread <count> use specified number of threads
-n –delete-ntapi use NtDeleteFile to remove files
* By default the thread count is set to the number of CPU cores. For local folders it doesn’t make sense to go above that, but for folders on network shares raising the thread count may be a good thing to try, especially for high-latency connections.
You can use the main command byenow folderpath, e.g. byenow c:test to delete the test folder on the c: partition using as many threads as there are CPU cores.
The parameter –staged lists the folders and files under the specified structure first before they are deleted. It is probably a good idea to use the –preview parameter to run a test without deleting anything.
Other options include adding a confirmation prompt using –yes, change the number of threads using –threads xx, or use the NtDeleteFile API by using –delete-ntapi.
Removals are quick when using byenow and the program may be an option for users who need to delete large folders regularly or want to speed up the deletion of a single large folder once. The source code of the application is available as well.
Now You: How long have you waited the most when deleting folders?
Thank you for being a Ghacks reader. The post byenow is a command line tool for Windows to delete folders faster appeared first on gHacks Technology News.