zipを解凍するして実行ディレクトリーにファイルを移動させる
①ディレクトリー内に.zipファイルでループで取得する
②.Power Shellで解凍実行する
③オブジェクト設定ファイル保存場所でのファイルをループで取得する
④オブジェクト設定ファイルをバッチ実行ディレクトリーにコピーする、その時連番を振り返りファイル名が被らないようにする
rem 連番countを使うためのおまじない setlocal enabledelayedexpansion rem 実行フォルダ名を指定 set file=bin rem オブジェクト設定ファイル保存場所 set depfile=xl\embeddings rem 連番用の数値 set count=1 rem ① for %%B in (%file%\*.zip) do ( rem ② powershell Expand-Archive -Path %~dp0\%%B -DestinationPath %~dp0\%file%\%%~nB -Force rem ③ for %%C in (%file%\%%~nB\%depfile%\*.*) do ( rem ④ copy %~dp0\%file%\%%~nB\%depfile%\%%~nC%%~xC %~dp0\%%~nC!count!%%~xC set /a count=count+1 ) )
1つ1つの意味や動作については実行するか調べてください
コメントを残す