Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1680

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

$
0
0
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

Viewing all articles
Browse latest Browse all 1680

Trending Articles