Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2007
    Posts
    28

    cd .. change directory possible?

    I have this project I want to use as a launcher for a program. The project will launch files in a directory previous of the project directory. How would I launch these files using this example as I would use it in a batch file. (I don't want to create dozens and dozens of batch files).

    cd..
    myapp.exe
    cd AppFolder

    Not sure if there is a way to do this, but maybe I am missing something. Thanks to anyone who can help.

  2. #2
    Join Date
    Apr 2009
    Posts
    277
    look at the help file at "Folder.SetCurrent"

  3. #3
    Join Date
    Dec 2007
    Posts
    28
    I played around with that Action, but that would work if the files to be launched were in a upper subfolder. I have to get a folder that is outside the project, the folder that is BEFORE the source folder. For instance my project would be this.

    C:\MyApp\AMS Project\AutoPlay.exe

    C:\MyApp\myapp.exe

    How would I set the current folder to C:\MyApp so I can launch myapp.exe?

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    If you are building your project to a "Web/Email Executable" then this line of code -

    Code:
    drv = String.SplitPath(String.Replace(_CommandLineArgs[1], "SFXSOURCE:", "", true)).Drive;
    will give you the drive e.g. " C:" and you can build the rest of the path from there since you presumably know what it is.

    Note this will only work if it's an exe. If you build to a normal folder structure, then the code -

    Code:
    drv = _SourceDrive
    will give you the drive letter.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts