Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

add the ability for touch to not clear the /dxx and /txx fields with /r in certain casesh

Sep
69
1
I don't know how to use the options for code so I hope I can get this to work right. I want to copy a file's last modification to it's creation time. I currently do the following
@echo off
setlocal
for /r %%a in (*) do (
touch /dc%@filedate["%a",w] /tc%@filetime["%a",w,s] "%a"
)
endlocal

If I could use the /rw %a I wouldn't have to use the variable functions so
touch /dc /tc /rw %a %a
It would be even better to have an option to do this directly so I wouldn't have to use the for loop
 

Similar threads

Back
Top