For loops

From Edgar BV Wiki
Jump to navigation Jump to search
In a batch file:

FOR %%A IN (Datasubset) DO Command %%A

FOR %%A IN (c:\backupmysql\*) DO "C:\blat194\blatt.bat" %%A

On the command line:

FOR %A IN (c:\backupmysql\*) DO "C:\blat194\blatt.bat" %A

(only one %!)

blatt.bat

"C:\Installed by xxx\blat194\blat" "c:\Installed by xxx\blat194\hello.txt" -to red@email.com -s "Database backup %date%" -mime -base64 -attach %1

So the above command emails every file in c:\backupmysql\ to red@email.com using blat.

http://www.robvanderwoude.com/index.html