file path from upload command

new BookmarkLockedFalling
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

metro
Full Member
***

metro Avatar

Posts: 207

Last Edit: Aug 8, 2019 18:25:17 GMT -5 by metro
Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Aug 9, 2019 14:54:36 GMT -5


the trouble is Carl is still swamped and from what I understand he is having trouble locating the code for runbasic
so it could be some time before this is addressed.


Interesting! I thought Carl had given up on RB. So.. I had given up on using it for anything new..
A couple of obvious things that would make this a great language.
1. Fix the locks in SQLite or better yet give it ODBC.
2. Fix the memory leaks. When I was using RB for some real jobs, I wrote a program to kill and restart RB about every hour or so to get it to free up memory.

However after all the years without fixes, I don't have a lot of hope. But I'd move back if stuff started working.

Thanks for the info and 'ave a g'day.
I think I'll just have a stubby in a isky and call it a day...


Last Edit: Aug 9, 2019 14:56:13 GMT -5 by meerkat
StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Aug 13, 2019 6:21:16 GMT -5

Hmmm!
I ran the following program and ask for a file "c:\data\temp\a.html
I still cannot get the PATH. I do not want the DIRECTORY.


upload "Find a file"; fil$
print "fil:";fil$ ' this is only the file name without the path
print "DefaultDir:";DefaultDir$


After I clock [upload] I get the following results:
File uploaded: a.html
fil:a.html
DefaultDir:c:\rbp101


It returns in fil$ only the file name "a.html" and does NOT include the PATH.
Looking at DefaultDIr$ after the [upload] it still points to my RB directory "c:\rbp101" and not "c:\data\temp"
Anyway, even if it did return the correct pointer, it is the DIRECTROY and not the relative web PATH

So how do I get the PATH??

Last Edit: Aug 13, 2019 6:22:29 GMT -5 by meerkat
StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

jerry
Junior Member
**

jerry Avatar

Posts: 86Male

Post by jerry on Aug 17, 2019 20:09:53 GMT -5

metro Avatar

I see no obvious solution Dan, but then I'm not the sharpest tool in the shed
the trouble is Carl is still swamped and from what I understand he is having trouble locating the code for runbasic
so it could be some time before this is addressed.

y'all have a great day



CAN'T FIND THE CODE???? Sorry, I call bullshit on this one. How does the creator/developer of runBasic lose that source code?

Yeah, and I'll buy a bridge from you too....
An old guy that cant wait to retire!
StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
carlgundel
Administrator
*****
Creator of Run BASIC

carlgundel Avatar

Posts: 975

Post by carlgundel on Aug 18, 2019 18:29:04 GMT -5

jerry Avatar
metro Avatar
I see no obvious solution Dan, but then I'm not the sharpest tool in the shed
the trouble is Carl is still swamped and from what I understand he is having trouble locating the code for runbasic
so it could be some time before this is addressed.

y'all have a great day

CAN'T FIND THE CODE???? Sorry, I call bullshit on this one. How does the creator/developer of runBasic lose that source code?

Yeah, and I'll buy a bridge from you too....


I didn't lose the source code, of course. But I haven't done a build in a very long time and it will take a concerted effort to rework the build process, and right now I'm working on Liberty BASIC and this is the wrong time to shift gears.

-Carl
carlgundel
Administrator
*****
Creator of Run BASIC

carlgundel Avatar

Posts: 975

Post by carlgundel on Aug 19, 2019 11:14:18 GMT -5

carlgundel Avatar
jerry Avatar
CAN'T FIND THE CODE???? Sorry, I call bullshit on this one. How does the creator/developer of runBasic lose that source code?

Yeah, and I'll buy a bridge from you too....
I didn't lose the source code, of course. But I haven't done a build in a very long time and it will take a concerted effort to rework the build process, and right now I'm working on Liberty BASIC and this is the wrong time to shift gears.

To be fair, I'm not sure that I might have something like I was looking for the code, but that doesn't mean I lost it. I have lots of backups of my work but that doesn't mean that I always know where the very latest files are, so I was digging around. I did find the code, but I will need to make time to do anything with it.

-Carl
metro
Full Member
***

metro Avatar

Posts: 207

Post by metro on Aug 19, 2019 15:46:33 GMT -5

carlgundel Avatar
carlgundel Avatar
I didn't lose the source code, of course. But I haven't done a build in a very long time and it will take a concerted effort to rework the build process, and right now I'm working on Liberty BASIC and this is the wrong time to shift gears.
To be fair, I'm not sure that I might have something like I was looking for the code, but that doesn't mean I lost it. I have lots of backups of my work but that doesn't mean that I always know where the very latest files are, so I was digging around. I did find the code, but I will need to make time to do anything with it.

-Carl

of course bullshiting is a national past time where I come from but in this case I believe I misunderstood Carl's reply to a PM
sorry Carl
Actually I just re-read what I posted and I believe "having trouble" in my lingo means it would be a lot of trouble ie
I have better things to do ATM...
and it's a (PITA) to find
Last Edit: Aug 19, 2019 19:39:06 GMT -5 by metro
Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
jerry
Junior Member
**

jerry Avatar

Posts: 86Male

Post by jerry on Sept 11, 2019 15:13:02 GMT -5

metro Avatar
carlgundel Avatar
To be fair, I'm not sure that I might have something like I was looking for the code, but that doesn't mean I lost it. I have lots of backups of my work but that doesn't mean that I always know where the very latest files are, so I was digging around. I did find the code, but I will need to make time to do anything with it.

-Carl
of course bullshiting is a national past time where I come from but in this case I believe I misunderstood Carl's reply to a PM
sorry Carl
Actually I just re-read what I posted and I believe "having trouble" in my lingo means it would be a lot of trouble ie
I have better things to do ATM...
and it's a (PITA) to find



Carl,

That's great news. I am dearly awaiting a revised version with all or most of the suggested additions. I have a short list is you are interested.

As for Liberty Basic, when will a Linux version come out? Ive been windows free since win3.1 when I bounced to OS/2 and then on to Linux in 1995.
An old guy that cant wait to retire!
jerry
Junior Member
**

jerry Avatar

Posts: 86Male

An old guy that cant wait to retire!
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Jul 3, 2020 12:44:03 GMT -5

I finally wrote my own. It only shows the server side directories. For me, that was ok since client directories was not allowed. It uses DIR for windows, but I think Linux conversion would work using ls/la or something like that.

' ---------------------------------------------
' Directory
' ---------------------------------------------
cr$ = chr$(13)
dirOf$ = "c:\" ' get directory of
bf$ = "<SPAN STYLE='font-family:Courier New; font-weight:700; font-size:10pt'>"

' -------------------------------------------
' Shell out directory
' -------------------------------------------

[dirShell]
cls
html bf$
loc$ = strRep$(dirOf,ドル"*.*","")
x$ = shell$("dir ";dirOf$)

i = 1
while word$(x,ドルi,cr$) <> ""
a$ = word$(x,ドルi,cr$)
if trim$(a$) = "" then goto [next]
if left$(a,1ドル) = " " then goto [next]
if left$(a,1ドル) = cr$ then goto [next]
type$ = mid$(a,26,3ドル)
size$ = mid$(a,30,9ドル)
size$ = strRep$(size,ドル",","")
size = val(size$)
if type$ <> "DIR" and size = 0 then goto [next]
name$ = mid$(a,40ドル)
a$ = strRep$(a,ドル"<","[")
a$ = strRep$(a,ドル">","]")
html left$(a,39ドル)
link #ddir,name,ドル [doDir]
#ddir setkey(type$;"|";loc$;name$)
html "<BR>"
goto [next1]
[next]
print a$
[next1]
i = i + 1
wend
wait
[doDir]
type$ = word$(EventKey,1,ドル"|")
name$ = word$(EventKey,2,ドル"|")

if type$ = "DIR" then
dirOf$ = name$;"\*.*"
goto [dirShell]
end if
print "Selected File:";name$
wait

' --------------------------------
' string replace rep str with
' --------------------------------
FUNCTION strRep$(str,ドルrep,ドルwith$)
ln = len(rep$)
ln1 = ln - 1
i = 1
while i <= len(str$)
if mid$(str,ドルi,ln) = rep$ then
strRep$ = strRep$ + with$
i = i + ln1
else
strRep$ = strRep$ + mid$(str,ドルi,1)
end if
i = i + 1
WEND
END FUNCTION

end



Hope this helps..
Dan