The example sketch for "openNextFile()", located here has two flaws: (1) Once in a subdirectory, it never goes back to find more recent files in the root directory. (2) It then endlessly loops through sending "nomorefiles".
So here is my corrected sketch, which I hope you can use to replace the flawed one:
sketch_jun20a.ino:1:9: error: #include expects "FILENAME" or
sketch_jun20a:6: error: variable or field 'printDirectory' declared void
sketch_jun20a:6: error: 'File' was not declared in this scope
sketch_jun20a:6: error: expected primary-expression before 'int'
sketch_jun20a:3: error: 'File' does not name a type
sketch_jun20a.ino: In function 'void setup()':
sketch_jun20a:8: error: 'SD' was not declared in this scope
sketch_jun20a:9: error: 'root' was not declared in this scope
sketch_jun20a:10: error: 'printDirectory' was not declared in this scope
sketch_jun20a.ino: At global scope:
sketch_jun20a:18: error: variable or field 'printDirectory' declared void
sketch_jun20a:18: error: 'File' was not declared in this scope
sketch_jun20a:18: error: expected primary-expression before 'int'