AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MoveEx(isting) - Files at next System Startup [CMD]

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
BoBo
Guest





PostPosted: Wed Jan 12, 2005 2:16 pm    Post subject: MoveEx(isting) - Files at next System Startup [CMD] Reply with quote

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


Cool
Back to top
Atomhrt



Joined: 02 Sep 2004
Posts: 128
Location: Sunnyvale

PostPosted: Wed Jan 12, 2005 8:47 pm    Post subject: Re: MoveEx(isting) - Files at next System Startup [CMD] Reply with quote

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
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Jan 12, 2005 9:00 pm    Post subject: Reply with quote

Maybe I'm understanding it wrong, but couldn't you simply RegWrite to that registry value shown in the description?
Back to top
View user's profile Send private message
Atomhrt



Joined: 02 Sep 2004
Posts: 128
Location: Sunnyvale

PostPosted: Wed Jan 12, 2005 10:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group