linlianboy 当前离线
上等兵
评分人数
terse 当前离线
中将
@echo off set "Ph=\\192.168.1.10\d$\bakup" for /f "delims=" %%i in ('dir /b/ad/od "%Ph%"') do set "str=%%~xi" set /a "var=%str:.=%+1" echo %var% pause复制代码
TOP
for /f "delims=.)" %%i in ("%str%") do set /a "var=%%i+1"复制代码