Passing root directory of a project as an argument to a Run command

2013-12-07
2013-12-15
  • Hi,

    I have created few projects under a workspace and I would like to pass root directory of the project of the file currently being edited as an argument to one of the batch command I've written.

    For e.g.,:

    my_batch_cmd $(PROJECT_ROOT_DIR)

    As per the documentation, this feature does not seem to be available. Please let me know if its possible to achieve this in notepad++.

    Thanks & Regards,
    nagu.

     
    Last edit: Nagarajan Chinnasamy 2013-12-07
  • cchris
    cchris
    2013-12-15

    This would be difficult, since a file may belong to several porojects, and N++ is a text /file/ editor. A project is just a way to access and group related files - you could use a Windows collection if using Win7 or higher.

    I'd use some script to
    define, when you start working on a project, what tits root is in some environment variable
    then pass this environment variable to your batch and let it resolve the variable.

    Or there is a niftier way depednding on what the batch does.
    CChris