rename
Posted: 22 Dec 2010 03:33
my bat file has these two for loops for copying files and moving folders. Need to modify them
to rename files and folders that already exist in the destination with a time stamp before copying and moving the sources.
for /f "tokens=* delims= " %%f in ('dir/s/b dira\*.bin ^|find /v "DDD"') do (copy "%%f" dirb)
for /f %%d in ('dir /b /ad "dirC"') do (move /y dir1\%%d dirD)
to rename files and folders that already exist in the destination with a time stamp before copying and moving the sources.

for /f "tokens=* delims= " %%f in ('dir/s/b dira\*.bin ^|find /v "DDD"') do (copy "%%f" dirb)
for /f %%d in ('dir /b /ad "dirC"') do (move /y dir1\%%d dirD)