@echo off
setlocal ENABLEDELAYEDEXPANSION
rem 拡張子が「.txt」のファイルを対象に繰り返す
set box=C:\Users\81805\Desktop\作業フォルダ\
set /a num=0
for %%a in (%box%%1*) do (
set /a num=num+1
echo !num!:個目%box%%%a
)
echo 合計:!num!個
More than 3 years have passed since last update.
@echo off
setlocal ENABLEDELAYEDEXPANSION
rem 拡張子が「.txt」のファイルを対象に繰り返す
set box=C:\Users\81805\Desktop\作業フォルダ\
set /a num=0
for %%a in (%box%%1*) do (
set /a num=num+1
echo !num!:個目%box%%%a
)
echo 合計:!num!個
Register as a new user and use Qiita more conveniently