this little script lets you select a drive/folder and sets the "modified" timestamp of every file and folder in it to the value of the "created" timestamp (NTFS only, obviously).
don't ask me why one would do this, I had to do it it ...
Code:
;=======================================================================
; AutoHotKey script: SetModToCrea.ahk (V1.0 28.11.06)
;
; set "modified" timestamp of dirs/files to same value as "created"
; for a whole dir tree
;
; use script or parts of it as you like but at your own risk
;
; andreas lang, conTEXT AG, Zurich, Switzerland
;=======================================================================
#SingleInstance ignore ; don't start script more than once
n = 0 ; files/dirs counter
FileSelectFolder, dir, *C:\, 0 ; don't allow making new folder
if ErrorLevel or dir =
{
msgBox no folder selected. exit!
exit
}
StringRight, lastDirChar, dir, 1 ; fetch last char of dir
If lastDirChar = \
{
; root dir! don't try changing timestamp
StringTrimRight, dir, dir, 1 ; chop trailing backslash
}
Else ; touch selected dir itself
{
FileGetTime, dirCreaDate, %dir%, C
FileSetTime, %dirCreaDate%, %dir%, M, 1, 0
++n
}
Loop, %dir%\*.*, 1, 1 ; recursive loop over files AND folders
{
; files AND folders, no recursion
FileSetTime, %A_LoopFileTimeCreated%, %A_LoopFileLongPath%, M, 1, 0
++n
}
msgBox MODIFIED to CREATED timestamp set for %n% dirs/files.
exit
;=======================================================================