Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the current directory path with FreeBasic?
#1
Hi,
I am a QB user trying to adapt myself to FreeBasic.

I saw that FreeBasic uses Dir$ function instead of FILES statement to read files.
I am needing to read the current directory path when getting a file list, that in QB could be made (for instance) by capturing the first line of the FILES statement's output text.

How do I properly get the current directory path with FreeBasic?

Thank you,
-Izan
Reply
#2
you can get the path that the exe resides in with the function EXEPATH. try this proggie


Code:
? EXEPATH
Sleep
Reply
#3
You can also get *just* the exe name by doing this:

Code:
dim exe_name as string
exe_name = dir(command$(0))
print exe_name
sleep
Reply
#4
I dont think he wants the exe path, he wants the current path, which could be something else. If I am right, you want the Curdir $ command
[Image: freebasic.png]
Reply
#5
good call deleter :chinese:
Reply
#6
Thanks everybody for the fast and useful replies!
Yes Deleter, CurDir$ is exactly what I was looking for!
-Izan
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)