Variable file name with a memory stick
dodger
Posts: 37
Hello,
I would like to open a new file everytime I press a momentary push button.· I can currently close and open a file this way when the file name is constant.· I have tried the format object to create a file name.· I can see the first file when i open the memory stick but there is no data saved to it.·Could someone point me in the right direction?·
Thanks
I would like to open a new file everytime I press a momentary push button.· I can currently close and open a file this way when the file name is constant.· I have tried the format object to create a file name.· I can see the first file when i open the memory stick but there is no data saved to it.·Could someone point me in the right direction?·
Thanks
Comments
OBJ fmt:Format
buffer byte[noparse][[/noparse]13]
fmt.cprintf(@buffer,string("FILE%04.4d.TXT"),id)
will create a null terminated filename
FILE0000.TXT if id is 0
FILE0001.TXT if id is 1
etc.
in byte array buffer
regards peter
Post Edited (Peter Verkaik) : 5/30/2009 7:31:14 AM GMT