There is more or less well-known command line way to update the modification time of a file on Windows (described at Update file or folder Date Modified, for example):
copy /b somePath\fileName+,, somePath\
According to my experience it does for a file, but does not for a directory (tested on WinXP - the command did not fail, but the directory modification time was not updated).
I tried to adjust it for a directory using such a trick that we can "point" to the directory using a special "NUL" filename on Windows. I tried two ways to do that, but they don't work as well:
copy /b somePath\fileName\NUL+,, somePath\filename\
copy /b somePath\fileName\NUL+,, somePath\
Could anyone explain me why it does not work or what I am doing wrong?