0

So I'm trying to create a new file that has underscores in its name. However, when I try this, no file is created.

This works

String fileName = "NMEA.txt";
mySensorData = SD.open(fileName.c_str(), FILE_WRITE); 

This does not work

String fileName = "NMEA__23_33_3__16_7_29.txt";
mySensorData = SD.open(fileName.c_str(), FILE_WRITE); 

Does anyone know why?

asked Jul 29, 2016 at 23:49

1 Answer 1

3

[The SD library] uses short 8.3 names for files.

source

answered Jul 29, 2016 at 23:55
3
  • Do you have any tips on how I can organize my files then? As you can see in the above format, I have it as NMEA__hr_mn_ss__yr_mm_dd.txt. Commented Jul 30, 2016 at 0:21
  • I tried String fileName = "/23_33_3/16_7_29/NMEA.txt" to organize it by directory and it doesn't seem to create them. Commented Jul 30, 2016 at 0:22
  • Have you actually created those directories? It won't magically make them for you... Commented Jul 30, 2016 at 9:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.