Skip to content

Instantly share code, notes, and snippets.

@hfziu
Created March 28, 2023 07:35
Show Gist options
  • Save hfziu/bc5763429359d3adadc8877ecd05e302 to your computer and use it in GitHub Desktop.
Save hfziu/bc5763429359d3adadc8877ecd05e302 to your computer and use it in GitHub Desktop.
Set all LaTeX auxiliary files in the current directory (recursively) to be ignored by Dropbox (zsh and PowerShell scripts)
# use Get-ChildItem to find all auxiliary files with extension .aux, .fls, .synctex.gz, .log, .ldb_latexmk and .xdv recursively
Get-ChildItem -Path $pwd\* -Recurse -Include *.aux, *.fls, *.synctex.gz, *.log, *.ldb_latexmk, *.xdv | ForEach-Object {
# set the file to be ignored by Dropbox
Set-Content -Path $_.FullName -Stream com.dropbox.ignored -Value 1
}
#!/usr/bin/env zsh
xattr -w com.dropbox.ignored 1 **/*.{aux,fdb_latexmk,fls,log,synctex.gz,xdv}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment