Skip to content

Instantly share code, notes, and snippets.

@shigero
Created December 1, 2013 18:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shigero/7739074 to your computer and use it in GitHub Desktop.
ディレクトリ内のファルダを再帰的に取得して、フォルダ単位で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