By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!d:\tcmd v22>filedates.btm history.sav test1.tmp
─────────────────────────────────────────────────────────────────────────────────────────────
history.sav
Creation Date: 10/26/2017 00:48
Last Mod/Write Date: 12/12/2017 19:53
Access Date: 12/07/2017 17:57
─────────────────────────────────────────────────────────────────────────────────────────────
test1.tmp
Creation Date: 12/13/2017 15:09
Last Mod/Write Date: 12/13/2017 16:26
Access Date: 12/13/2017 17:27
d:\tcmd v22>touch /r:w /r:c /r:a history.sav test1.tmp & filedates.btm history.sav test1.tmp
12/07/2017 17:57:18.427 D:\TCMD v22\test1.tmp
───────────────────────────────────────────────────────────────────────────────────────────────────
history.sav
Creation Date: 10/26/2017 00:48
Last Mod/Write Date: 12/12/2017 19:53
Access Date: 12/07/2017 17:57
───────────────────────────────────────────────────────────────────────────────────────────────────
test1.tmp
Creation Date: 12/13/2017 15:09
Last Mod/Write Date: 12/13/2017 16:26
Access Date: 12/07/2017 17:57
d:\tcmd v22>touch /r:w /r:c history.sav test1.tmp & filedates.btm history.sav test1.tmp, still without affecting the creation date/time.
12/13/2017 16:30:16.863 D:\TCMD v22\history.sav
12/13/2017 16:30:16.863 D:\TCMD v22\test1.tmp
────────────────────────────────────────────────────────────────────────────────────────
history.sav
Creation Date: 10/26/2017 00:48
Last Mod/Write Date: 12/13/2017 16:30
Access Date: 12/07/2017 17:57
────────────────────────────────────────────────────────────────────────────────────────
test1.tmp
Creation Date: 12/13/2017 15:09
Last Mod/Write Date: 12/13/2017 16:30
Access Date: 12/07/2017 17:57
No. TOUCH will only modify a single timestamp per /R invocation.
But you could cheat a bit with:
TOUCH /r:w /r:c /r:a sourcefile targetfile
TOUCH /r:acw source target
No. TOUCH will only modify a single timestamp per /R invocation.
But you could cheat a bit with:
TOUCH /r:w /r:c /r:a sourcefile targetfile
v:\> touchall 00:00:00 a1
2017-12-14 00:00:00.000 V:\a1
2017-12-14 00:00:00.000 V:\a1
2017-12-14 00:00:00.000 V:\a1
v:\> filetimes a2
Created: 2017-12-13 19:33:03
Accessed: 2017-12-13 19:33:03
Modified: 2017-12-13 19:33:41
v:\> TOUCH /r:w /r:c /r:a a1 a2
2017-12-14 00:00:00.000 V:\a2
v:\> filetimes a2
Created: 2017-12-13 19:33:03
Accessed: 2017-12-14 00:00:00
Modified: 2017-12-13 19:33:41
v:\> touchall 11:11:11 a1
2017-12-14 11:11:11.000 V:\a1
2017-12-14 11:11:11.000 V:\a1
2017-12-14 11:11:11.000 V:\a1
v:\> filetimes a2
Created: 2017-12-14 00:00:00
Accessed: 2017-12-14 00:00:00
Modified: 2017-12-14 00:00:00
v:\> TOUCH /r:w a1 a2 /r:c a1 a2 /r:a a1 a2
2017-12-14 11:11:11.000 V:\a2
2017-12-14 11:11:11.000 V:\a2
2017-12-14 11:11:11.000 V:\a2
v:\> filetimes a2
Created: 2017-12-14 11:11:11
Accessed: 2017-12-14 11:11:11
Modified: 2017-12-14 11:11:11
Agreed, but that's what aliases are for; right?I saw that. It doesn't work.
Code:''''''''''''''''''''''''''''''''''''''''''''
This works (third command below) but it's a tad cumbersome.
Code:....................................... v:\> TOUCH /r:w a1 a2 /r:c a1 a2 /r:a a1 a2 2017-12-14 11:11:11.000 V:\a2 2017-12-14 11:11:11.000 V:\a2 2017-12-14 11:11:11.000 V:\a2 v:\> filetimes a2 Created: 2017-12-14 11:11:11 Accessed: 2017-12-14 11:11:11 Modified: 2017-12-14 11:11:11