回复 2# yhcfsr
如果存在电脑中存在多个同名文件,可以采用伪数组的方法- @echo off
- for /f "tokens=2 delims==" %%a in ('wmic datafile where "FileName='BatHome_Batcher' and extension='txt'" get Caption /value') do (
- set/a n+=1
- call,set "files[%%n%%]=%%a"
- )
-
- for /f "tokens=2 delims==" %%a in ('set files[') do echo;%%a
- pause
复制代码
|