[texhax] "tex project file collector" or anything alike?

Gordon Haverland ghaverla at materialisations.com
Wed Oct 26 23:51:36 CEST 2011

On October 26, 2011, Donald Arseneau wrote:
> "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2 at cdc.gov> writes:
> > my temporary LaTeX processing files from
> > 
> > > > my folders before doing backups
> Nah.  Cleaning means removing dirt and junk, not
> everything entirely.

I would be inclined to do this in perl.  If a person globs for 
*.tex in a directory, that gets you all the .tex files.  Get the 
basename and then look for .log files for the basename.  If you 
find a .log file, open the file and look for all the related files 
that were created by some kind of TeX processor.  Most of those 
can probably be deleted.

Exceptions.  Some people run TeX via some kind of make process.  
If your Makefile has a name related to the basename, you probably 
don't want to delete it.  I occasionally run diction, or even 
style, against a document.  But, style wants plain text, not TeX.  
I would end up with *.text, *.diction and possibly *.style from 

I suppose you could do it in a shell, with grep, awk and others.  
To me, it would be clunky.  Perl works.  I suppose python would 

But, my normal process is to fire up emacs, and use directory edit 
(dired) for that kind of cleanup.


More information about the texhax mailing list