| View previous topic :: View next topic |
| Author |
Message |
BoBo Guest
|
Posted: Wed Jan 12, 2005 2:16 pm Post subject: MoveEx(isting) - Files at next System Startup [CMD] |
|
|
| Quote: | Registers file move operations to be accomplished during the next system start.
MoveEx [existing-file [new-file]] [/d # [/DeleteAllOK]]
existing-file Complete path to the file to move or to delete.
new-file Complete path to the new filename. If new-file exists it will be
overwritten unless the /o option is included. If new-file is not
specified, existing-file will be deleted.
/d Delete the entry number from the list of pending operations.
/DeleteAllOK Do not ask if OK to delete all entries.
/o Do not overwrite new-file if it exists.
With no parameters the current pending rename operations are printed.
The /d option will delete an individual entry if # is greater than 0. If # is 0
(zero), all entries will be deleted after verification from the user. User
verification can be included on the command line with the /DeleteAllOK option.
Pending rename operations are stored in:
WINNT: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
PendingFileRenameOperations
Windows9x: %WINDIR%\WININIT.INI [Rename]
Examples:
MoveEx %SystemRoot%\Memory.dmp &REM Delete
MoveEx C:\temp\NewExplorer.exe %SystemRoot%\Explorer.exe &REM Rename
MoveEx &REM List entries
MoveEx /d 0 &REM Delete entries |
 |
|
| Back to top |
|
 |
Atomhrt
Joined: 02 Sep 2004 Posts: 128 Location: Sunnyvale
|
Posted: Wed Jan 12, 2005 8:47 pm Post subject: Re: MoveEx(isting) - Files at next System Startup [CMD] |
|
|
| BoBo wrote: | | Quote: | Registers file move operations to be accomplished during the next system start.
MoveEx [existing-file [new-file]] [/d # [/DeleteAllOK]]
|
|
This is the same as the MoveEx API call that is used to replace or delete files that are in use at next reboot. This could be a wish-list item for AHK? _________________ I am he of whom he speaks! |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Wed Jan 12, 2005 9:00 pm Post subject: |
|
|
| Maybe I'm understanding it wrong, but couldn't you simply RegWrite to that registry value shown in the description? |
|
| Back to top |
|
 |
Atomhrt
Joined: 02 Sep 2004 Posts: 128 Location: Sunnyvale
|
Posted: Wed Jan 12, 2005 10:18 pm Post subject: |
|
|
Here is the link to the MSDN article: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/movefileex.asp
Note that directories have to be empty first, therefore a recursive delete of a directory can be quite a chore unless you write code to perform the task instead. That is, traversing the directory tree executing the MoveFileEx command on each file first, then on the parent dir(s). _________________ I am he of whom he speaks! |
|
| Back to top |
|
 |
|