How to expand two local variables inside a for loop in a batch file

前端 未结 3 1585
天涯浪人
天涯浪人 2020-12-22 05:10

I\'m trying to write a script which should read from a list of files and copy each item to a new location, following the same structure.

Originally, this was intende

3条回答
  •  囚心锁ツ
    2020-12-22 05:53

    FOR %%y IN ("!dest_file_full!") DO set "dest_file_dir=%%~dpy"
    

    should get your destination drive+path+terminal \ into dest_file_dir.

    needless to say, no doubt, the :: form of comment shouldn't be used in a block.

提交回复
热议问题