Monday, November 08, 2010 at 12:06 AM.


on dosBatchCommand (cmdstring) {
		<<11/28/08; 7:47:58 AM by DW
			<<Randomize the name of the batch file.
		<<11/22/08; 3:47:00 PM by DW
			<<Created. Run the string as a batch file.
	if system.environment.isWindows {
		local (ftmp = frontier.getsubfolder ("/ops/temp/") + "tmp" + clock.ticks () + ".bat");
		file.writewholefile (ftmp, cmdstring);
		launch.appwithdocument ("", ftmp);
		clock.waitseconds (1)}}
		<<try {file.delete (ftmp)}
<<bundle //test code
	<<dosBatchCommand ("net stop apache2.2")
	<<dosBatchCommand ("net start apache2.2")

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.