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:
- 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
).
Show the "Options Interface" (Options -> Options Interface) and click on "Advanced Configuration":

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

A local copy of ExeCompilerPost.edt
gets opened. In this file search for the following lines near the end of the file:
IfFileExists("%O\%N.%!7",!"CopyFile('%O\%N.%!7','%P\%N.%!7',1);DeleteFile('%O\%N.%!7');");
IfFileExists("%O\%N%$('PDF-SyncEx');",>
!"CopyFile('%O\%N%$(|PDF-SyncEx|);','%P\%N%$(|PDF-SyncEx|);',1);DeleteFile('%O\%N%$(|PDF-SyncEx|);');");
JMP(!"Post_Done");
Replace these lines with the following:
IfFileExists("%O\%N.%!7",!"CopyFile('%O\%N.%!7','%P\%N.%!7',1);DeleteFile('%O\%N.%!7');");
IfFileExists("%O\%N%$('PDF-SyncEx');",>
!"CopyFile('%O\%N%$(|PDF-SyncEx|);','%P\%N%$(|PDF-SyncEx|);',1);DeleteFile('%O\%N%$(|PDF-SyncEx|);');");
IfFileExists("%P\%N%$('PDF-SyncEx');",>
!"WinExe('','cmd.exe /C attrib +h %N%$(|PDF-SyncEx|);','%P','',011100);");
JMP(!"Post_Done");
Save the file and you're done.
Now, every time you compile a file, the associated synctex file is saved as a hidden file.
.synctex
file?.synctex
file, but only to set its file attribute to "hidden".