Swiss File Knife
a command line
free external tools,
- download the free Swiss File Knife Base from Sourceforge. - open the Windows CMD command line, Mac OS X Terminal or Linux shell. - OS X : type mv sfk-mac-i686.exe sfk and chmod +x sfk then ./sfk - Linux: type mv sfk-linux.exe sfk and chmod +x sfk then ./sfk OS X and Linux syntax may differ, check the help within the tool.
sfk ... +perline "command #text" for every chain text line run sfk commands(s) like a sub function, passing the text as parameters. options -yes really execute. default is just to simulate what would be done. -nohead does not display the [simulating:] info text. -stoprc=n stop on return code >= n instead of default 9. -nostop do not stop on errors regardless of rc. command string format each word, separated by whitespace, is a parameter. to fill in the current chain text line use $text or #text. perline uses a strict command format by default. to insert characters $ or # as is type $$ or ## with option -spat, slashpatterns like \t \q \xnn are supported. to use multiple words as one parameter use -spat and \q ... \q quoted multi line parameters are supported in scripts using parm trim. type "sfk script" for details. recursion limit if the called function calls another function by call or perline this should not be nested too often, otherwise sfk may crash. see also sfk run for the full command string format sfk stacksize test available stack size web reference http://stahlworks.com/sfk-perline examples sfk echo -lines 100 101 102 +perline -spat "web -nodump \q.$text/xml/restart.xml\q" on local ip's .100 .101 and .102 call a web command /xml/restart.xml.  sfk sel mydir .jpg +perline -spat "echo <img src=\q#ufile\q width=\q400\q> +tofile -append print.html" create a file print.html containing all .jpg files of folder mydir, shown with 400 pixels width. 
sfk is a free open-source tool, running instantly without installation efforts. no DLL's,
no registry changes - just get sfk.exe from the zip package and use it (binaries for
windows, linux and mac are included).
read more about all sfk functions here.