Menu

Command Line Launching

2007-08-07
2012-11-13
  • Keyser Soze

    Keyser Soze - 2007-08-07

    I has an instance of notepad++ running with a file from c:\temp\directory1\.

    From a command prompt, I cd'd to another directory, say c:\temp\Directory2\.  This directory contained a file "example file.Text".  I tried to launch notepad++ with 'notepad++ "Example file.txt" from this directory but kept getting the error: "File c:\temp\directory1\example file.txt does not exist."

    I then shutdown the existing instance of notepad++ and tried again and received the same error. 

    Are there settings I need to set to allow me to use notepad++ from the command line in this fashion?

    Thanks.

     
    • MJG

      MJG - 2007-08-14

      I guess Notepad++ is keeping the default directory set to the one used when you first start the program.  You will need an explicit path to work around this.  --Joel

       
      • Nobody/Anonymous

        How about, instead, the bug gets fixed? I find the need for this workaround a silly thing.

         
        • Nobody/Anonymous

          Have you read the release notes lately? It actually _has_ been fixed :) Since 4.9

           
    • Nobody/Anonymous

      I noticed this right away since I'm always using the original notepad from any directory.  Notepad++ seems to have a real problemw with what I would presume to be the default method of opening a file.  But I did figure out how to open any file from the command line:

      Notepad++ ".\filename.txt"

      The .\ tells Notepad++ to use the current directory.
      The quotes are needed in case the current directory has any spaces in it.

      So, for example, if the current directory is c:\program files, and want to open test.txt, then:

      Notepad++ ".\test.txt" is interpreted by Notepad++ as:

      Notepad++ "c:\program files\test.txt"

      which is knows what to do with.

       
MongoDB Logo MongoDB