datetime - Batch For Loop w/ Timestamp -



datetime - Batch For Loop w/ Timestamp -

i need rename multiple files in loop , include time stamp... struggles begin updating timestamp each file file has unique name.

setlocal enabledelayedexpansion set date=%date:~-4,4%%date:~-10,2%%date:~-7,2% /f %%a in ('dir /b tca_*') (set time=%time:~-11,2%%time:~-8,2%%time:~-5,2%%time:~-2,2% ren %%a %date%tca_%time%.txt)

thanks

while in loop, variables don't update. circumnavigate this, setlocal enabledelayedexpansion script added.

basically, if want them update, need encase them in exclamation marks (!) instead of percent signs (%).

datetime for-loop batch-processing batch-rename

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -