Iterating through a Directory and storing the maximium file number as an integer

Thx Robtillaart!

This sprintf function is quite a useful thing !
I recognize what you mean by "if (open name is successful)" is:

"if (SD.exists(name))" where name is that character data type.

I was wondering what you meant by "close name", can you close the char datatype?
did you mean File.close()? (which we presumably not need cause we don't need to introduce the File class?)

Cheers,
DennyP