Home > OS >  BAT batch to find the same root directory, directory inside all the word ends in a TXT file is copie
BAT batch to find the same root directory, directory inside all the word ends in a TXT file is copie

Time:09-19

Such as e: \ \ 08 2019 directory, now need to be as e: \ \ \ 08 04, 2019 e: \ \ \ '05, 08 2019 e: \ 2019 \ \ 6, 08 the data replication at the end of this 3 days to TXT, how to write the batch? Whether to e: \ \ 08 2019 as a constant, the back of the {03,04,05} as variables?

CodePudding user response:

Feeling problem in this 3 days, batch seems to be no straightforward way; Other xcopy can,

CodePudding user response:

Possible, use for/l, details please see the for help

CodePudding user response:

FOR/L % variable IN (start, step, end) DO command [command - the parameters]

The set said in incremental form a sequence of Numbers from start to finish, therefore, (1,1,5) will generate sequence
1, 2, 3, 4, 5, 5, 1, 1) will generate sequence (5 4 3 2 1)
  • Related