String read not working in SPIFFS file open

Hi - here's my code:

String fileLoader1 = String(loadChoice);
Serial.println(fileLoader1);
String fileLoader2 = "\"/save" + fileLoader1;
String fileLoader3 = fileLoader2 + ".txt\", \"r\"";

  File f = SPIFFS.open(fileLoader3);
  if (!f) {
      Serial.println("file open failed");
  }  Serial.println("=======Load Save=======");

All the save files follow the format "save##.txt", and the INT loadChoice contains the ## portion of the filename. I did a print of the fileLoader1 string to make sure the number was coming through, and it was correct.

But I still get "file open failed" - the system works fine if I enter the number manually before uploading, so I'm guessing that the SPIFFS.open(fileLoader3) portion is not being interpreted correctly....but it looks correct to me :\

I'm hoping someone here who's much better with C will see immediately the issue in my process here, any help would be appreciated!

edit: printing fileLoader3 gives me the correct filepath: "/save1.txt", "r"
So I'm guessing that it's just an issue with this function not being able to handle strings?

Try something like this. If you use a String variable as a parameter, you don’t wrap it with embedded quotes. The parameter r is, however, a literal and must be quote wrapped.

String fileLoader2 = String ( "/save" + fileLoader1 + ".txt") ;
File f = SPIFFS.open(fileLoader2, "r") ;

Printing all fileloader variables might reveal something.

6v6gt:
Try something like this. If you use a String variable as a parameter, you don’t wrap it with embedded quotes. The parameter r is, however, a literal and must be quote wrapped.

String fileLoader2 = String ( "/save" + fileLoader1 + ".txt") ;
File f = SPIFFS.open(fileLoader2, "r") ;

You did it! Thanks! I guess it didn't like having both arguments in a single string.