バッチファイル フォルダ内のファイルを一つずつ処理する小技
dirコマンドでフォルダ内のファイルを取得 > ファイルリストに書き込み、for文で実行する。
set testDir="/path/dir" dir /b /s /a-d %testDir% > file.list for /f %%I in (file.list) do ( echo %%I ) del file.list
dirコマンドでフォルダ内のファイルを取得 > ファイルリストに書き込み、for文で実行する。
set testDir="/path/dir" dir /b /s /a-d %testDir% > file.list for /f %%I in (file.list) do ( echo %%I ) del file.list