Skip to content
/ Touch Public

AutoHotkey function to set, store and restore the datetime stamp of a file or folder.

Notifications You must be signed in to change notification settings

hi5/Touch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Touch() - v0.1

Function for AutoHotkey to set, store and restore the datetime stamp of a file or folder. Useful when you are modifying files and you want to keep the original datetime stamp. The datetime stamp properties are stored in a static object.

Touch(file = "" [, set = "0", WhichTime = "M", Reference = "0"] )

Options:

  • file: file name to (re)store the datetime stamp of. If you want to "delete" all stored settings, simply call Touch() to clear the static object.
  • Set:
    • 0: Update the datetime stamp of a file or folder to current datetime making it a simple shorthand for the FileSetTime command. (this is the default if the parameter is blank or omitted)
    • 1: Store the datetime stamp of a file or folder
    • 2: Restore the datetime stamp of a file or folder
    • 3: Update the datetime stamp of a file or folder which was previously stored using Set=1
  • WhichTime: Which timestamp to get/set. Value: M, C, or A
  • Reference: File, use this file's timestamp instead of current time

Returns: ErrorLevel - see AutoHotkey documentation http://www.autohotkey.com/docs/misc/ErrorLevel.htm

About

AutoHotkey function to set, store and restore the datetime stamp of a file or folder.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published