SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Directory where library is stored (at runtime)

    I am using ExecuteFile to load libraries, however I want to grab the path to the current library so I can ExecuteFile other libraries in the same folder. Is there a way to get the filename of the currently running code? This will be different that the directory of the Test.

    <font color="blue">
    'Need to set LibraryFolder to folder where MainLibrary resides

    ' Create FileSystemObject
    Set fso = CreateObject("Scripting.FileSystemObject")

    'Set path to search
    Set folder = fso.getFolder(LibraryFolder)

    ' Load each library (*.qfl) except MainLibrary.qfl
    For Each objFile in folder.Files
    If Not LCase(objFile.Name) = "MainLibrary.qfl" And LCase(Right(objFile.Name, 3)) = "qfl" Then
    ExecuteFile objFile.Path
    End If
    Next
    </font>

  2. #2
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Directory where library is stored (at runtime)

    Environment.Value("TestName")
    or simple:
    Environment("TestName")

    Janna

  3. #3
    Member
    Join Date
    May 2007
    Posts
    90
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Directory where library is stored (at runtime)

    Search on the PathFinder.Locate method it will be help full to you

  4. #4
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Directory where library is stored (at runtime)

    [ QUOTE ]
    Environment.Value("TestName")
    or simple:
    Environment("TestName")

    Janna

    [/ QUOTE ]

    That just gives me the Test's Name. I need the path where the library is located. The code above is in the MainLibrary.qfl library, and I need to find a way to say "what is the path to this library?"

  5. #5
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Directory where library is stored (at runtime)

    [ QUOTE ]
    Search on the PathFinder.Locate method it will be help full to you

    [/ QUOTE ]

    Thanks. This looks like it will work. I was hoping for a solution where I didn't have to pass in a filename, but at least this gets me closer to where I wanted to be.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:44 AM.

Copyright BetaSoft Inc.