I use WinEdt 10.1 and Sumatrapdf. I find the inverse search extremely useful. However, the .synctex files are quite annoying to me because I work within a folder which contains up to a hundred latex files (and I arrange the files according to the time modified). In WinEdt, there is an option to put all the auxiliary files to a folder called "TeXAuX" which is very neat but somehow the .synctex file has to be in the same directory as the .tex file.

So my question is, is there a way (preferably by modifying the "compile" command within WinEdt's option) to change the attribute of the .synctex file to "hidden" immediately after compilation?

Thanks in advance!

  • Welcome to TeX SX! I don't know, but I would find it quite useful too that .synctex files might be located in a subdirectory of the main file directory.
    – Bernard
    Commented Jul 14, 2017 at 19:08
  • 3
    That probably could be done on the TeX side, but how would SumatraPDF or other previewer know where to find the .synctex file?
    – egreg
    Commented Jul 14, 2017 at 19:13
  • 2
    @egreg, the OP doesn't want to move the .synctex file, but only to set its file attribute to "hidden". Commented Jul 15, 2017 at 6:11
  • Crosspost
    – Johannes_B
    Commented Jul 15, 2017 at 12:45

2 Answers 2


There's no WinEdt macro that acts on the file attributes.

However we can tell WinEdt to use the attrib DOS command to achieve what you want.

These are the steps you have to follow:

  1. Open the file %B\Exec\ExeCompilerPost.edt in WinEdt (%B is the directory where you've installed the program, something like C:\Program Files\WinEdt Team\WinEdt 10).
  2. Show the "Options Interface" (Options -> Options Interface) and click on "Advanced Configuration":

    enter image description here

  3. Now, in the Options Interface toolbar, click on the button "Create and Open Local Copy":

    enter image description here

  4. A local copy of ExeCompilerPost.edt gets opened. In this file search for the following lines near the end of the file:

  5. Replace these lines with the following:

          !"WinExe('','cmd.exe /C attrib +h %N%$(|PDF-SyncEx|);','%P','',011100);");
  6. Save the file and you're done.

Now, every time you compile a file, the associated synctex file is saved as a hidden file.

  • What is the idea behind step 1? Why open the original too? Commented Jul 15, 2017 at 10:11
  • @UlrikeFischer It is very likely that a local copy of ExeCompilerPost.edt doesn't exist in the OP's system. Unless you manually created it, only the ChkTeX add-on creates a local copy and modifyes it. Commented Jul 15, 2017 at 11:24
  • Ah I see. I hadn't realized that there is no entry for the file in the option menu to "double click". Commented Jul 15, 2017 at 12:37

You can use -output-directory="output" (right side is dir name) parameter, like

xelatex -synctex=1 -interaction=nonstopmode -output-directory="output" "something.tex"

so that your outupt will be placed in separate directory, but directory must exist, so that it can write in it. But I am not sure how it will work with inverse search.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .