Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Assuming that all folders are in the same root directory (in the example c:\tmp), then something like this will be:
@echo off
set "source_dir=c:\tmp"
for /f "tokens=* delims=" %%a in ('dir /s/b "%source_dir%\*" ') do (
rar a "%%~dpna" "%%~fa"
del /f/q "%%~fa"
)
Like this (did not check) Powershell
ls -Recurse -Attributes !Directory | %{ Compress-Archive $_.FullName ($_.FullName+".zip"); rm $_.FullName}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question