I've looked up the options in Texmaker but it doesn't seem it has this feature "open containing folder". Is there an option regarding this matter?

  • No there isn't. I try to build a user command that do this (this is easy) but my explorer doesn't work fine so it doesn't work – touhami Aug 2 '16 at 7:13
  • @touhami, thanks. Please transfer the comment to an answer so that I can accept it. – CroCo Aug 2 '16 at 7:16
  • 1
    I will try to share the idea my be it works for you. – touhami Aug 2 '16 at 7:17

Notes Following Texmaker's documentation the character ! represents the current directory so the idea is to use a user command explorer.exe ! (under windows or equivalent for other platforms). Indeed, if i try command pdflatex !/myfile.tex where myfile.tex is a file in current directory the command works fine and i get the file compiled but I can't get it to work with explorer.exe

Here is a solution (under windows)

Make a batch file myexplorer.bat with contents:

explorer.exe %~dp1
  1. in Texmker go to menu: User-->User commands-->Edit user commands
  2. paste this command <PathOfMyBatch>\myexplorer.bat %.tex

enter image description here enter image description here


So, turns out this question wasn't about TeXStudio (which is what this answer is regarding) at all! I'm going to leave this here anyways, as a reminder for me to read the title next time...

macOS or Linux

In macOS, go to Preferences -> Build -> User Commands. Add a new command called "open working directory" whose contents is simply

open .

Build section in TeXStudio preference window

You can run the command from Tools -> User -> open working directory.

enter image description here

I assume the process is identical (except for menu layout perhaps) on Linux.


Same as above, but the command is now

start !

If @touhami is right about TeXStudio using ! to represent the current directory, or try

start .

If this website is to be trusted:

The period is used in the Command Prompt as a shorthand for the current folder, so this will open the current folder in File Explorer.

Which would match with my understanding...

  • (+1) for the effort. In Windows, opening the current folder is done via start .. – CroCo Jul 17 '17 at 17:10
  • Although not exactly Texmaker... – TeXnician Jul 17 '17 at 17:20
  • Ha! I found this question when searching for a similar function for TeXStudio... Guess I read the title the way I wanted to instead of actually reading it... – twilsonco Jul 18 '17 at 5:37

For me, using Texstudio on Windows, the working command is

cmd.exe /c "start ."
  • 2
    Welcome to TeX.SX! Where should this command be issued? – egreg Oct 17 '17 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.