Skip to content

Instantly share code, notes, and snippets.

@BGMcoder
Created September 16, 2017 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BGMcoder/4ad75fed0c64e6e6285e6c27d6f114ae to your computer and use it in GitHub Desktop.
Save BGMcoder/4ad75fed0c64e6e6285e6c27d6f114ae to your computer and use it in GitHub Desktop.
Sets all File Attribute Dates to Today
;touch.ahk
;Brother Gabriel-Marie
;10:00 AM Saturday, September 16, 2017
;set all file attribute dates to current date
Loop %0% ; For each file dropped
{
GivenPath := %A_Index%
Loop %GivenPath%, 1
{
LongPath = %A_LoopFileLongPath%
FileSetTime, , %LongPath%, M
if(errorlevel)
msgbox a_lasterror
FileSetTime, , %LongPath%, A
if(errorlevel)
msgbox a_lasterror
FileSetTime, , %LongPath%, C
if(errorlevel)
msgbox a_lasterror
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment