Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extended KotD #11: _FULLPATH$
#1
Finally, a KotD that doesn't require a lot of writing about from me, nor a lot of reading about for you guys.  This one is extremely simple to learn, use, and implement -- https://qb64phoenix.com/qb64wiki/index.php/FULLPATH$

FullPath$, quite simply, returns the full path of whatever file you give it.   For example:

Code: (Select All)
Print _CWD$
Print _FullPath$("../../")

My QB64 stuff is located on my drive D:, inside the folders and subfolders: D:\QB64 Stuff\Official Phoenix Edition\QB64pe-fork

Running the above, on my laptop, and the result would be:

D:\QB64 Stuff\Official Phoenix Edition\QB64pe-fork
D:\QB64 Stuff

The _CWD$ gives the current workding directory, while the _FullPath$ gives the full path of that "../../" resolved path, which is "2 folders above the current one".

I honestly don't know what else to say about it.  You give it a relative path, or a file with a hardcoded path, and the command returns the resolved full path back to you.  That's all there is to this little command.   Quick.  Simple.  Easy to incorporate into existing code.   What more could you ever want?  Big Grin
Reply
#2
I'd forgotten about this one.  Added it today to a program I'm updating.  Also, the _StartDir$ solved a path problem I was having.    

These keyword posts are a help to me, just for reminding me of all things we have available.

- Dav

Find my programs here in Dav's QB64 Corner
Reply




Users browsing this thread: 2 Guest(s)