This will work for directories.
@echo off
for /D %%G in (./_ZIPME/*) do (
"C:\Program Files\7-Zip\7z.exe" a "./_ZIPME/%%G.7z" "./_ZIPME/%%G/*.*"
)
For a superb explanation and other dos help see
http://www.ss64.com/nt/for.html∞
Quick snippet..
The For command takes a fair number of parameters...
syntax-FOR-Files
FOR %%parameter IN (set) DO command
syntax-FOR-Files-Rooted at Path
FOR /R [[drive:]path] %%parameter IN (set) DO command
syntax-FOR-Folders
FOR /D %%parameter IN (folder_set) DO command
syntax-FOR-List of numbers
FOR /L %%parameter IN (start,step,end) DO command
syntax-FOR-File contents
FOR /F ["options"] %%parameter IN (filenameset) DO command
FOR /F ["options"] %%parameter IN ("Text string to process") DO command
syntax-FOR-Command Results
FOR /F ["options"] %%parameter IN ('command to process') DO command
Page was generated in 0.0104 seconds
There are no comments on this page. [Add comment]