Posted: 18th Jun 2007 15:55
Is it possible to create a file with the name taken from a variable?

if it is, how is it done?

the code i am using obviously isnt working because i think i'm doing it all wrong.

+ Code Snippet
for i = 1 to 10
   open to write i, "Files\data\userdata\"rnd(999)".sav"
   close file i
next i


Thanks, Mike
Posted: 18th Jun 2007 15:57
Change this line:
open to write i, "Files\data\userdata\"rnd(999)".sav"

to this:
open to write i, "Files\data\userdata\" + str$(rnd(999)) + ".sav"
Posted: 18th Jun 2007 19:03
thanks alot ian, i tryed the + variable + once before, but it looks like i forgot to add the str$() code.

Thankga, Mike