I'm trying to write a batch file using xcopy. I aim to copy outlooks NK2 file from C: to a network location. Which I have accomplished.
However, the bit I'm struggling with is that I need to have the batch file make the copy, then instead of overwriting that copy the next time the batch file is run(which will be on start up). I would like it to make a fresh copy.
I.e. the original would be seacore.nk2, the second copy would be seacore1.nk2, the third copy to be secore3.nk2 and so on. I would want it to do this 5 times, then on the 6th time to overwrite the original seacore.nk2 copy, then on the 7th time the seacore1.nk2 and so on in a permanent cycle.
I understand that this is possible, but I have a very poor understanding of batch files and I'm not sure in what context to use the commands.
Please can you help?!
xcopy "C:\Documents and Settings\swilkins\Application Data\Microsoft\Outlook\seacore.nk2" "\\main_fileserver\IT Files\Test Batch file" /y