[OS X TeX] MacOSX-TeX Digest, Vol 47, Issue 18

Themis Matsoukas tmatsoukas at me.com
Tue Sep 27 10:54:24 EDT 2011


On Sep 26, 2011, at 8:06 PM, Murray Eisenberg wrote:

> When I use asymptotemk, it generates a whole bunch of files that are _not_ deleted by use of the TeXShop console's "Trash Aux Files" button.
> 
> How can one change the TeXShop configuration so that these additional files are so deleted?

Here is a simpler, I think, script that removes latex clutter. It runs outside texshop by dropping a folder onto the script. An app version is also attached. You don't need to know any applescript to modify this to work with other extensions: 

1. Open the AppleScript Editor (in Applications/Utilities
2. Copy/Paste the script
3. Add more file extensions, if needed
4. Save as  .app.

>From there on, simply drop a folder on the app. It is not limited as to the base name of the file and it can probably be amended to work from inside TS. 

Themis

(*This script cleans up tex clutter; it acts recursively on all folders inside the original 
Original Script by Themis Matsoukas; Recursive code by Jean-Claude DE SOZA *)

(* the on-run handler is activated when the icon of the script is double-cicked *)

on run
	set my_folder to (choose folder with prompt "Please choose a folder") as alias
	GoCleanUp(my_folder)
end run

(* the on-open handler is activated when a folder is dropped onto the script icon *)
on open (drop_folder)
	set my_folder to drop_folder as alias
	GoCleanUp(my_folder)
end open

(* this handler does the actual job *)
on GoCleanUp(my_folder)
	tell application "Finder"
		delete (every file of my_folder whose name ends with ".aux")
		delete (every file of my_folder whose name ends with ".log")
		delete (every file of my_folder whose name ends with ".toc")
		delete (every file of my_folder whose name ends with ".out")
		delete (every file of my_folder whose name ends with ".pdfsync")
		delete (every file of my_folder whose name ends with ".gz")
		delete (every file of my_folder whose name ends with ".tui")
		delete (every file of my_folder whose name ends with ".top")
		delete (every file of my_folder whose name ends with ".tup")
		
		(* do the same with all folders inside the original folder*)
		set myFolderList to (every folder of my_folder)
		repeat with myFolder in myFolderList
			my GoCleanUp(myFolder)
		end repeat
		
	end tell
end GoCleanUp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rCleanUp.app.zip
Type: application/zip
Size: 27907 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20110927/2489bd82/attachment.zip>


More information about the MacOSX-TeX mailing list