Home > OS > A batch of how to assign multiple values to a variable
A batch of how to assign multiple values to a variable
Time:11-11
Such as I want to use the batch implement such a demand, the current folder obj files are assigned to a variable, such as D: \ work under a a.o bj, b.o bj and c.o bj etc. Multiple files, now the traverse D: \ work this folder, all the OBJS obj file path are given, finally the value of the output OBJS is OBJS=D: \ work \ a.o bj D: \ work \ b.o bj D: \ work \ c.o bj
Code is roughly as follows:
The set OBJS= For/r./% % a in (*. Obj) do ( The set OBJS "OBJS=% % % % a" ) Echo OBJS % %
But the code does not achieve this effect,
CodePudding user response:
The building Lord reference under this post "batch how to use a for loop to multiple values assigned to variables" https://zhidao.baidu.com/question/437608909787039844.html