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

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 ""

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:


From the Microsoft Press book Windows Vista Resource Kit, Second Edition.


Post a Comment