Author |
Message |
Antsabee
|
Posted: Thu Dec 22, 2005 9:16 pm Post subject: I Need Desprate help with directories |
|
|
I have a Problem Turing 3.1.1A
how do you set directories?, everytime
I try I either crash the program or
my computer can someone show
me a quick snipit of what opening a
directory should look like or give me
some tips on how it works??? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
do_pete
|
Posted: Thu Dec 22, 2005 10:58 pm Post subject: (No subject) |
|
|
code: | var streamNumber : int
var directory : string
put "Enter directory: " ..
get directory :*
streamNumber := Dir.Open (directory)
loop
var fileName : string
Dir.Get (streamNumber, fileName)
exit when fileName = ""
put fileName
end loop |
This should work |
|
|
|
|
|
do_pete
|
Posted: Thu Dec 22, 2005 11:03 pm Post subject: (No subject) |
|
|
Dammit I forgot this:
Dir.Close (streamNumber)
stick it at the end |
|
|
|
|
|
Mr. T
|
Posted: Fri Dec 23, 2005 1:43 am Post subject: Alex's Opinion |
|
|
Still doesn't work. Says Dir.Get can't have parameters. |
|
|
|
|
|
do_pete
|
Posted: Fri Dec 23, 2005 11:01 am Post subject: (No subject) |
|
|
Oh that's right, sorry I got mixed up between Dir.Get and Dir.GetLong and I diddn't have turing at that moment. You should go like this:
code: | var streamNumber : int
var directory : string
put "Enter directory: " ..
get directory : *
streamNumber := Dir.Open (directory)
loop
var fileName : string
fileName := Dir.Get (streamNumber)
exit when fileName = ""
put fileName
end loop
Dir.Close (streamNumber)
|
|
|
|
|
|
|
Antsabee
|
Posted: Fri Dec 23, 2005 4:28 pm Post subject: (No subject) |
|
|
but what exactly does this directory string look like?? and does the directory browser change to fit?? |
|
|
|
|
|
Antsabee
|
Posted: Fri Dec 23, 2005 4:33 pm Post subject: (No subject) |
|
|
OOO WOW allright the directory browser is a useless piece of garbage, thanks guys you were a big help!!! |
|
|
|
|
|
|