I'm using TeXstudio and I defined my command to copy the generated PDF into another directory:
cmd /C copy %.pdf C:\Users\me\myLatex\pdf
and all works fine.
Now I would like to specify the output path into the .tex file;
namely, I would like to do this:
cmd /C copy %.pdf outputDirectory
and in the TEX file something like (the following line does not make sense, is just to explain what I want to do):
\define outputDirectory = C:\Users\me\myLatex\pdf
in order to specify different output path for each document.
.texsource -- like for example% outputdirectory = C:\my\preferred\path\for\this\pdf. Then you can create a batch file that takes%.texas argument, searches in it for a line containing% outputdirectory =, strips the searched string from the result (or similar way to get only the path you set) and passes it to a copy command. Then use the batch file in TeXstudio same as you set the plain copy command. Of course, you need to take care of missing/invalid path, overwriting/renaming. – alwaysask Aug 10 '16 at 14:42% outputDirectory = C:\Users\me\myLatex\pdfor any other keyword combination you like. As for the batch file, sorry, can't help because: (1) I don't a have a Windows OS and (2) it's offtopic on this site (try http://stackoverflow.com -- {batch-file} is the tag to look for). – alwaysask Aug 10 '16 at 19:58