Use MoveFile and PendMoves to Move or Delete a File That is Always in Use

Files can’t be moved when they’re in use by the operating system or an application. If a file is constantly in use, you can schedule Windows Vista to move the file during startup using the MoveFile tool, which you can download for free.
Use MoveFile exactly like you would use the Move command. For example:
movefile file.txt test\file.txt
 
 
Movefile v1.0 - copies over an in-use file at boot time
Move successfully scheduled.

The file will not be moved immediately. However, the next time the computer is restarted, Windows will move the file. If you want to delete a file that is constantly in use (a common requirement for removing malicious software), provide "" as the destination. For example:
movefile file2.txt ""
 
 
Movefile v1.0 - copies over an in-use file at boot time
Move successfully scheduled.

The same download that includes MoveFile includes the PendMoves command, which displays moves and deletions that have been scheduled. You can simply run the command without parameters, as the following example demonstrates:
pendmoves
 
 
PendMove v1.1
Copyright (C) 2004 Mark Russinovich
Sysinternals - wwww.sysinternals.com
Source: C:\Users\User1\Documents\file.txt
Target: C:\Users\User1\Documents\dest\file.txt
Source: C:\Users\User1\Documents\file2.txt
Target: DELETE
Time of last update to pending moves key: 2/27/2008 10:08 AM

Read 178 times
Dylan Austin

About:

Whenever I have a problem, I sing. Then I realize my voice is worse than my problem.

Top
We use cookies to improve our website. By continuing to use this website, you are giving consent to cookies being used. More details…