Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem フォルダをbatにD&Dしてフォルダ内のリスト取得
- rem コマンドプロンプトに表示
- rem forfiles /p %~p1 /c "cmd /c echo @fname @ext"
- rem テキストファイルに書き出し(batのある場所にtmp.txt一時作成)
- forfiles /p %1 /c "cmd /c echo @fname@ext>> %~p0\tmp0.txt"
- setlocal enabledelayedexpansion
- for /f "delims=" %%a in (%~p0\tmp0.txt) do (
- set line0=%%a
- set line1=!line0:""=.!
- set line1=!line1:"=!
- echo !line1!>>%~p0\tmp1.txt
- )
- rem type %~p0\tmp0.txt > %~p0\rawlist_%~n1.txt
- type %~p0\tmp1.txt > %~p0\FILELIST01_%~n1.txt
- del %~p0\tmp0.txt
- del %~p0\tmp1.txt
- endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement