AutoHotkey: Create shortcuts keeping timestamps

From TotalcmdWiki
Revision as of 21:52, 6 August 2013 by Hacker (talk | contribs) (Created page with "This script creates shortcuts in the target panel to files selected in the source panel while keeping the shortcuts' timestamps the same as those of the original files. Loop...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This script creates shortcuts in the target panel to files selected in the source panel while keeping the shortcuts' timestamps the same as those of the original files.

Loop, Read, %1%
{
	SplitPath, A_LoopReadLine, , , , FileName
	FileGetTime, TimeStamp, %A_LoopReadLine%
	FileCreateShortcut, %A_LoopReadLine%, %2%%FileName%.lnk
	FileSetTime, %TimeStamp%, %2%%FileName%.lnk
}

To use, adda button to the Button Bar (or create a menu entry or user command for an alias or a keyboard shortcut) with the following parameters:

"%L" "%T\"

Back to AutoHotkey