Go Down

Topic: How many bytes can name a file using SD.open? (Read 1 time) previous topic - next topic

Fabyuu

Hello, I am trying to rename a .txt file dynamically (an ID and the current date) but I realized that the file does not name over 8 characters.
That is, I can only use 8 bytes for a file name?
thanks

ahref

Correct, you can only use 8 characters(8 Bytes) and a 3 character extension.

Code: [Select]

eg. textfile.txt
    (8).(3)

I used folders to sort out the problem your describing:
Code: [Select]

2012/11/08/<ID>.txt




Fabyuu

How to create directories on the sd card with arduino?
thanks...

ahref

Code: [Select]

if(!sd.exists(string)){
   sd.mkdir(string);
}

Feel free to make multiple levels of folders at once:
sd.mkdir("2012/11/09/");

works :)

Fabyuu

Even Linux terminal command
Thanks ahref  XD

Go Up