AutoHotkey: Create shortcuts keeping timestamps

From TotalcmdWiki
Revision as of 10:03, 9 August 2013 by White (talk | contribs) (Add category AutoHotkey scripts)
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