Skip to content

Instantly share code, notes, and snippets.

@thorade
Created October 22, 2014 07:44
Show Gist options
  • Save thorade/04a4eaa0a4047c523112 to your computer and use it in GitHub Desktop.
Save thorade/04a4eaa0a4047c523112 to your computer and use it in GitHub Desktop.
PowerShell script that deletes some TeX temporary files
# This Windows PowerShell script
# recursively deletes LaTeX temporary files
# from all folder below itself
# get current directory
$curDir = Split-Path -Parent $MyInvocation.MyCommand.Path
Write-Host $curDir
# delete files
get-childitem $curDir -include *.aex, *.aux, *.auxlock, *.bcf, *.blg, *.dpth, *.ilg, *.lof, *.log, *.lol, *.lot, *.nlo, *.nls, *.out, *.pyg, *.run.xml, *.synctex.gz, *.toc, *.xdv -recurse | foreach ($_) {remove-item $_.fullname}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment