File - execute -> Working Directory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mtway
    Forum Member
    • Aug 2001
    • 24

    File - execute -> Working Directory

    In the File - Execute command is there a way to may the "Working Directory" default to be the same as the path in "File to execute" path ?

    We are dynamically setting the .exe to execute and there is not an easy way to extract the path from it and set it into the working directory that I have found.

    thx
  • Corey
    Indigo Rose Staff Alumni
    • Aug 2002
    • 9745

    #2
    Re: File - execute -> Working Directory

    Sure it's easy to do in a number of ways, but as to your first question, simply use a variable. So for example if you set the variable %path% to contain a value such as "C:Windows\Desktop\Folder\" (Whether you set that variable dynamically or not is irrelevant) then just use %path% as your working directory...

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment

    • mtway
      Forum Member
      • Aug 2001
      • 24

      #3
      Re: File - execute -> Working Directory


      I have a variable with "C:\some\path\somewhere\some.exe"
      but I don't have "C:\some\path\somewhere\", short of adding more registry entries to have the path I see no functions that will give me the path given the above string ???

      I would like to avoid adding more registry stuff since the path is there I just have to get it out of the .exe string....

      Comment

      • Corey
        Indigo Rose Staff Alumni
        • Aug 2002
        • 9745

        #4
        Re: File - execute -> Working Directory

        Actually it's very simple to use a string function such as LEFT to extract that subpath. But again, if you store only the path in the variable you can use it for both, whichever you prefer...

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        • mtway
          Forum Member
          • Aug 2001
          • 24

          #5
          Re: File - execute -> Working Directory

          Sorry I was just blind and couldn't see String.ParsePath !!! right in the list

          Comment

          • Corey
            Indigo Rose Staff Alumni
            • Aug 2002
            • 9745

            #6
            Re: File - execute -> Working Directory

            Glad you got what you needed...

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment

            Working...
            X