Convertion tool

Shish Can someone write tool that
converts Sci decoder files
(like script.000) into interpriter
files (like 0.scr).
Or maybe Brian release it???
Omer Mor I think you only need to rename them...
Shish Yeah!!!
The smallest sci1 game -
Leisure Suit Larry has 547 files!!!
Rename them al!?!?!?!
I was mistaken...
I meant no conversion tool,
but renaming tool!
Pikachu14 Qbasic. Figure it out yourself.
Shish I haven't programmed in QBasic so long
so i forgot everything i'm wrighting:
shell "ren script.00"+ str$(i) +" "+ str$(i)+".scr"

But it's not working!
I think it's because + command make space
between strings...
Maybe someone can help???
Pikachu14 for i=0 to 517

'These lines add trailing zeros. This is the stupid, but easy way.
if len(str(i))=1 then thenum="00"+str(i)
if len(str(i))=2 then thenum="0"+str(i)
if len(str(i))=3 then thenum=""+str(i)

shell "ren script."+thenum+" "+thenum+".scr"

next i
Shish It's not working, man!
It's because
"blablabla" + str$(1) is not
"blablabla1", but
"blblabla 1"
i don't know why it's happens!!!
I tried it in all versions QB i have - 1.0, 4.0, 4.5
Maybe someone else can figure it out???
Omer Mor I don't know QBasic, but I know that in VB you need to use the '&' operator to append strings.
Maybe it'll work for you in Qbasic.
Mokalus_of_Borg str$(1) will return " 1", for reasons best known to itself. If you want to convert a number to a string, without spaces, you need to use ltrim$(str$(x)).

Mokalus of Borg

PS - I knew all those years programming in QBasic would come in handy some day.
PPS - Of course, I was never a hardcore QB hax0r like some freaks out there, but I made do.
df something like


dim i as integer

for i=0 to 999
shell "ren script." & i & " " & right$("00" & i, 3) & ".scr"
next