Menu

wNppExec working directory

Fabian
2008-11-03
2012-11-14
  • Fabian

    Fabian - 2008-11-03

    In my old Notepad++ (v5.0.3) I had the NppExec plugin installed; when opening the console, the working directory used to be that of the selected file.
    Now, with the latest versions of Notepad++ and the NppExec plugin, the working directory is always that of the Notepad++ instalation. I know I can CD to wherever I want, but that's added work that I didn't have before.

    What am I doing wrong?
    Thanks.

    Notepad ++ Version: v5.1 (ANSI)
    Plugin: NppExec v2.5 R2

     
    • Fabian

      Fabian - 2008-11-04

      Well, the way it used to work was excellent for me (I use to run a batch file which I modify frequently, so right after editing it I was able to run it whithout the need to CD to its location); if the new behaviour is good for most users, I'm fine with that.
      Maybe I'll be able in the future to find a workaround. Your proposal harrybharry seems not easy for a "simple human being" like me :) (I'm quite new to Notepad++).

      Thank you all for the answers. And thank you to the developers who make a great job in this very usefull program/environment!

      Fabian

       
    • DV

      DV - 2008-11-04

      I think it depends on Notepad++ behaviour. It seems old version of Notepad++ followed the directory of current file, and the new version does not do it. I can't say which behaviour is more correct.
      Maybe I'll add a new option in NppExec: "Always cd $(CURRENT_DIRECTORY)".

       
    • Fabian

      Fabian - 2008-11-04

      >
      > Maybe I'll add a new option in NppExec: "Always cd $(CURRENT_DIRECTORY)".
      >

      An option "Always cd $(FULL_CURRENT_PATH)" will be better in my case.
      Fabian

       
    • Harry

      Harry - 2008-11-04

      We hcanged the working directory behaviour to always revert to the installation directory unless an open/save dialog is active, to prevent the problem where people complain about locked directories. Currently, I think its set only once and always revert to its original state before and after open.save dialog actions, so oyu might be able to hijack it (this is an implementation detail and you cannot really rely on it).

      You'd have to start a secondary process for full control, but I can image thats far from ideal (though you might get away with it using Rundll.exe to prevent the need of another .exe)

       
    • DV

      DV - 2008-11-04

      OK, new NppExec's option "Follow $(CURRENT_DIRECTORY)" will be added :)

       
    • Fabian

      Fabian - 2008-11-04

      Thank you DV !