Stefano Piccardi wrote:
| Does anyone know how to change the creation and last access dates of
| a directory? TOUCH does not support directories. Thanks.
The method was mentioned by others. However, changing the "last accessed"
date of a directory is almost always a wasted effort. Almost any action
relating to a directory updates its access date.
Thank you both for your replies.
I had to fight TCC a bit to find a way to touch a directory tree without touching its files. The trick is that it seems TOUCH /A: works only when the directory name is "." at least for me. Any other full or relative directory path triggers an error. So, given %root%, the path of the tree root directory,
cdd /n "%root%"
global /q touch /a: /q /tw08:15 .
resets the write time of root and all its sub-directories to 8:15.