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


local (f, selectionlist = FinderMenu.getSelectionList (), nofiles = true);
if sizeOf (selectionlist) == 0 {
	dialog.alert ("Can't set types and creators because no files are selected in the Finder.");
for f in selectionlist {
	if not file.isfolder (f) {
		local (origtype = string (file.type (f)));
		local (origcreator = string (file.creator (f))); = origtype; = origcreator; = "File " + file.fileFromPath (f) + ":"; (;
		if defined ( {
			delete (;
			if != origtype {
				file.settype (f,};
			if != origcreator {
				file.setcreator (f,};
			file.setmodified (file.folderFromPath (f), ());
			Finder.update (f)};
		nofiles = false}};
if nofiles {
	dialog.alert ("Can't set types and creators because folders don't have type/creator attributes.")}

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.