woob.wiki : Mass7zipStuffInWindows

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2005-12-22 00:39:57 by DougBarry []

Additions:
The For command takes a fair number of parameters...
FOR /F ["options"] %%parameter IN ('command to process') DO command

Deletions:
The For command takes a fair number of parameters...
	  FOR /F ["options"] %%parameter IN ('command to process') DO command




Oldest known version of this page was edited on 2005-12-22 00:37:20 by DougBarry []
Page view:
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
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.5.0
Page was generated in 0.0836 seconds