Deprecated: Function set_magic_quotes_runtime() is deprecated in /var/hosting/woobcouk/public_html/wiki/wikka.php on line 836
woob.wiki : Mass7zipStuffInWindows

woob.wiki : Mass7zipStuffInWindows

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
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

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.5.0
Page was generated in 0.0104 seconds