Results 1 to 2 of 2

Thread: App.path?

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Sweden
    Posts
    38

    App.path?

    I'm writing an activex control that is to be used on the web. The control should be able to open a textfile that's located at the c:\ root of the user's computer. Is there a way to get to there? I've tried using:

    Current = Dir("C:\")
    While Current <> ""
    If Right(Current, 3) = "txt" Then
    Combo4.AddItem Mid(Current, 1, Len(Current) - 4)
    If Combo4.Text = "" Then Combo4.Text = Mid(Current, 1, Len(Current) - 4)
    b = 1
    End If
    If Current = "Settings.txt" Then a = 1
    Current = Dir
    Wend

    This does not work when I try it from the server. I guess that it's looking at the server and not on the host computer. Is app.path a possibility?

  2. #2
    Stiletto
    Guest
    App.Path will give u the current path of where the app is running from.
    If you opens the app from "C:\MyApps\App.exe", App.Path will give u "C:\MyApps"

Posting Permissions

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



Click Here to Expand Forum to Full Width