Skip to content

Instantly share code, notes, and snippets.

@shigero shigero/archive.bat

Created Dec 1, 2013
Embed
What would you like to do?
ディレクトリ内のファルダを再帰的に取得して、フォルダ単位でzipアーカイブ(無圧縮)するbatファイル。 ※要7-zipインストール
@echo off
set exe="C:\Program Files\7-Zip\7z.exe"
for /R /D %%i in (*) do (
echo %%i
cd "%%i"
%exe% a -tzip -mx=0 "%%i.zip" * >> NUL
cd ..
if exist "%%i.zip" rmdir /S /Q "%%i"
)
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.