Hey fellows,
I am in the middle of creating a file browser (desktop, not internet) to read saved game files etc. But I can't figure out how to get the address bar to say the correct path after I press backspace (to go up a folder level, the "..") It just displays "C:\blah\..\..\.." adding dots when I press backspace.
Here is a working example section of the code:
It doesn't load any files or anything, just displays the path.
The only way I thought to fix this was to create a formula to count the \ slashes and find out the last one and then trim off the rest of the text, but there must be an easier way right?
right?
I am in the middle of creating a file browser (desktop, not internet) to read saved game files etc. But I can't figure out how to get the address bar to say the correct path after I press backspace (to go up a folder level, the "..") It just displays "C:\blah\..\..\.." adding dots when I press backspace.
Here is a working example section of the code:
;; Global folder$="C:\Program Files\Blitz3D\Samples" SetBuffer BackBuffer() ;; read the directory .loaddir sel=ReadDir(folder$) ;; load files ; ;; ;; draw the folders etc Repeat Cls Text 0,0,folder$,0,0 If KeyHit(14) ;[backspace] folder$=folder$+"\.." ;Delete Each file Goto loaddir EndIf If KeyHit(1) End Flip Forever
It doesn't load any files or anything, just displays the path.
The only way I thought to fix this was to create a formula to count the \ slashes and find out the last one and then trim off the rest of the text, but there must be an easier way right?
right?