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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extended KotD #25, #26, and #27: INTEGER DIVISION, CINT, and CLNG SMcNeill 19 3,580 05-04-2025, 11:29 PM
Last Post: SMcNeill
  Extended KotD #23 and #24: _MIN and _MAX SMcNeill 0 616 01-16-2025, 09:51 AM
Last Post: SMcNeill
  Extended KotD #22: _MOUSEHIDDEN SMcNeill 0 620 01-14-2025, 12:29 AM
Last Post: SMcNeill
  Extended KotD #20: _NOTIFYPOPUP SMcNeill 4 1,359 12-05-2024, 01:55 AM
Last Post: Pete
  Extended KotD #21: _MIDISOUNDBANK a740g 8 2,776 08-30-2024, 07:32 PM
Last Post: Steffan-68

Forum Jump:


Users browsing this thread: 1 Guest(s)