AutoHotkey: Create shortcuts keeping timestamps: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
(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...")
 
(Add category AutoHotkey scripts)
Line 14: Line 14:


Back to [[AutoHotkey]]
Back to [[AutoHotkey]]
[[Category:AutoHotkey scripts|Create shortcuts keeping timestamps]]

Revision as of 10:03, 9 August 2013

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