So I recently recovered an entire hard drive which left me with a metric fuck ton of tiny files. It takes roughly 30 minutes for the folder to even open which means conventional deleting methods are out the window. After a bit of research I came up with a simple batch script that can be configured to delete files under a specific size. Here it is set to delete anything from the specified folder under 5Kb.
:: BATCH SCRIPT START @ECHO OFF :: Set following variable for file size in Bytes (1024 Bytes=1KB, 1024KB=1MB, 1024MB=1GB) SET /A FileSize=5120 :: Set following variable for file extensions to check (*.* = all files) SET Filter=*.* :: Set following variable with path to check insided for files SET Folder=G:\Billy FOR /R "%Folder%" %%F IN (%Filter%) DO ( IF %%~zF LSS %FileSize% ( ECHO Deleting "%%F" DEL /F "%%F")) EXIT /B /0 :: BATCH SCRIPT END