Gammadyne Corporation

DELNEXT.EXE

DELNEXT.EXE is a free Windows command line program that schedules one or more files or folders to be deleted during the next reboot.  This is useful for deleting files that are currently in use (and therefore locked).

Usage

DELNEXT [/d"..."] [/move"..."] [/nologo] [/now] [/pause] [/s] files...


Switches:
/dThe default path where the files are located.  If omitted, the current working directory is used.  The path must follow the /d switch immediately (no spaces), and be surrounded in quotes.
/moveInstead of deleting, the file specified in this switch will replace the target file during the next reboot.
/nologoDon't display the program banner.
/nowDelete the file immediately if possible.
/pauseAsk the user to press a key before terminating.
/sRecursively enter subfolders.

Example #1

C:\dos>delnext c:\foo\example.txt
Gammadyne Delete At Next Reboot Utility 5.1 (delnext.exe) - www.Gammadyne.com
Copyright (C) 2005-2019 by Greg Wittmeyer - All Rights Reserved

c:\foo\example.txt ... success


Example #2

C:\dos>delnext /d"c:\windows" /s "foo bar.dll" logon.exe
Gammadyne Delete At Next Reboot Utility 5.1 (delnext.exe) - www.Gammadyne.com
Copyright (C) 2005-2019 by Greg Wittmeyer - All Rights Reserved

c:\windows\foo bar.dll ... success
c:\windows\system32\logon.exe ... success


Example #3

C:\dos>delnext /move"c:\temp\foo.dll" c:\windows\foo.dll
Gammadyne Delete At Next Reboot Utility 5.1 (delnext.exe) - www.Gammadyne.com
Copyright (C) 2005-2019 by Greg Wittmeyer - All Rights Reserved

c:\windows\foo.dll ... success


Notes

  • The * and ? wildcards are supported.
  • The operating system will delete the file before any drivers are loaded or services are started.  This makes DELNEXT an excellent tool for ridding a system of viruses.
  • Some viruses will detect when one of their files is missing, and restore it.  It is important to delete all of the files associated with the virus.
  • Files cannot be located on a network share because they are deleted before networking support is booted.
  • Folders must be empty in order to be deleted.
  • Deleted files are not moved to the Recycle Bin, they are permanently deleted.  For a good undelete utility, we recommend Back2Life.
  • Because the system deletes the file, the presence of delnext.exe is not required.  Hence, delnext.exe can be deleted after it is used.  This makes it useful as part of a software uninstaller.
  • The registry key where delayed deletions and moves are located is:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
    in the value named "PendingFileRenameOperations".

Download

Click the button below to download version 5.1 of DELNEXT.EXE, released October 10th, 2019.