Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_OpenFile Dialog in same folder as exe
#14
Just remember to use _CWD$ at the start of the program, and to save the result to a non-changing variable.  If you navigate to different folders, your _CWD$ isn't going to be the same one that you started in.

Code: (Select All)
$If WIN Then
    Dim Shared As String * 1 Slash: Slash = "\"
$Else
        Dim Shared As String * 1 Slash: Slash = "/"
$End If

Dim Shared As String ExePath
ExePath = _CWD$

CHDIR "C:\"
Print ExePath, _CWD$
Reply


Messages In This Thread
_OpenFile Dialog in same folder as exe - by bplus - 12-04-2022, 08:28 PM
RE: _OpenFile Dialog in same folder as exe - by SMcNeill - 12-05-2022, 05:54 AM



Users browsing this thread: 16 Guest(s)