|I am looking to try and move files from one directory to another. When I move the files I want to rename them, Ideally I would like to timestamp them with the current time but a random number will work.|
Here is my current code at the moment the files are moved but the random value does not seem to work.
for /f "tokens=* delims= " %%a in ('dir/b/a-d *.mq') do (
echo move %%a C:\DEV\%random%%%a)
move TCLMD_97.mq C:\DEV\31070TCLMD_97.mq
move TCLMD_98.mq C:\DEV\31070TCLMD_98.mq
move TCLMD_99.mq C:\DEV\31070TCLMD_99.mq
Also I am hard coding the directory path could I set that as a value rather to make it easy to update ?