How to schedule file move or delete on reboot

script_icon I had posted how to view pending file operations with WhyReboot and this time it is how to schedule some.

Sysinternals has simple command line utility called MoveFile that does just that.

What it does

MoveFile is single function command line utility that schedules files for move

movefile.exe [source] [destination]

or delete

movefile.exe [source] ""

on next reboot by creating instructions in Windows registry.

It is safest way to deal with locked files (non-reboot but risky approach is using utilities like Unlocker or FileASSASSIN) and can be total life-saver against malware.

Using in recycle bin fashion

Command line is hardly convenient interface for most users. In this case I made tiny script that uses MoveFile to schedule deletes but will accept drag and drop.

c:\movefile %1 ""

Correct path to MoveFile if needed and place it on desktop. Will act pretty much as recycle bin.

Script https://www.rarst.net/script/schedule_delete.cmd

Overall

MoveFile could use some kind of graphical interface but even without one it is handy and scriptable. As rest of Sysinternals utilities it makes some registry entries but works without installation.

Home&download http://technet.microsoft.com/en-us/sysinternals/bb897556.aspx

Related Posts