Todays Stupid Question....command line



  • I am trying to start notepad++ from within my database app with the following syntax

    sys_shell_wait(“notepad++.exe -openSession <c:\my databases\aviation\txt\CurrentLog.txt>”,.T.)

    Notepad++ opens but says "cant find the “CurrentLog.Txt” file. It is where I say it is!!
    Am I missing something here?



  • @Graham-Wickens

    -openSession is only used for opening [sessionname].xml files that were saved with file > save session

    a saved session file is not a document itself, but a list of tabs/files that were opened, when you saved this “session” to a file.

    the correct way to open notepad++ and one specific file is:
    "path_to_your\notepad++.exe" "c:\my databases\aviation\txt\CurrentLog.txt"

    i don’t know your database app syntax for opening a program plus one argument value, but looking at your template it could be something like:
    sys_shell_wait("path_to_your\notepad++.exe", "c:\my databases\aviation\txt\CurrentLog.txt",.T.)
    although i don’t know what the ,.T. would stand for.

    or if only one command without additional argv’s is allowed, you might need to “escape” double quotes in double quotes with a \:
    sys_shell_wait("\"path_to_your\notepad++.exe\" \"c:\my databases\aviation\txt\CurrentLog.txt\"",.T.)



  • Yes, that did it, many thanks


Log in to reply