Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Operating Systems .: Windows Operating Systems .: MS DOS .: How to Move File using MV.exe (Resource Kit)

How to Move File using MV.exe (Resource Kit)

Move File - Copy a file to another location even if the file is in use (Locked)

Syntax
      MV /x /d source destination

Key
   The first file name is the file to be copied and the second 
   the destination pathname.

   /d : does not copy the file until reboot time
        allows in-use files to be replaced

   /x : Prevents the default action that will otherwise create a 
        folder called "deleted" containing a copy of the 
        original file.

Note that you must use a FULL pathname to each file.

The NT resource kit contains 2 versions of MV.EXE - a posix version and a Windows NT version - they are not the same!

The /d option is not available with the posix version of mv, but if you prefer, you can do a file replace at boot time by manually updating the registry (which is all MV.exe does)

Start the registry editor (regedt32.exe not regedit.exe)

Move to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager

Double click on
PendingFileRenameOperations
(if it does not exist - create of type multi_str )

On the first line is the name of the new file with \??\ in front,
e.g.
\??\d:\temp\ntfs.sys

On the second line is the file to replaced with !\??\ in front,
e.g.
!\??\c:\winnt\system32\drivers\ntfs.sys

Click OK

So the complete Multi-String Data would appear like:

\??\d:\temp\ntfs.sys
!\??\c:\winnt\system32\drivers\ntfs.sys

Once the reboot is complete and the file replaced the PendingFileRenameOperations value will be deleted from the registry


How helpful was this article to you?

Related Articles

article How to Move a file from one folder to another using MOVE command
Move a file from one folder to another ...

(No rating)  3-9-2008    Views: 168   
article How to Find and Replace text within file(s) using MUNGE.exe (NT4 Resource Kit)
Find and Replace text within file(s)...

(No rating)  3-9-2008    Views: 218   
article How to Accept user input to a batch file using CHOICE.EXE (Resource KIT)
Accept user input to a batch file.Choice...

(No rating)  3-7-2008    Views: 208   

User Comments

Add Comment
No comments have been posted.