Skip to content

Instantly share code, notes, and snippets.

@mkropat
Last active August 29, 2015 14:04
Show Gist options
  • Save mkropat/8d385f15936876ac151d to your computer and use it in GitHub Desktop.
Save mkropat/8d385f15936876ac151d to your computer and use it in GitHub Desktop.
Fast-delete the files in the delete queue
:: DeleteQueue.bat - Fast-delete the files in the delete queue
:: Instructions:
::
:: 1. Create the folder `C:\DeleteQueue`
:: 2. Create a scheduled task to run this batch file every night
::
:: Now any (potentially large) files or folders you move into
:: `C:\DeleteQueue` (a nearly instantaneous operation) will be deleted
:: overnight, without interrupting your flow.
::
:: (Optional) Repeat the above instructions for every other drive you want to
:: delete large files from.
::
:: Based on a post by Hugo (http://superuser.com/a/289399/129855)
set DELETEQUEUE=C:\DeleteQueue
del /f/s/q %DELETEQUEUE% > nul
rmdir /s/q %DELETEQUEUE%
mkdir %DELETEQUEUE%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment