You can use the File class to rename files.
Type: Posts; User: Norm
You can use the File class to rename files.
Your code does this now:
File[] listOfFiles = aFile.listFiles(); // saves file references in an array
What else do you need?
Is this a question of reading API doc for the PDFBox Merger utility to understand how to use it?
I'm not sure about how to preserve the contents of a PDF file, but for text files:
Open output file
begin loop to work thru a list of files
copy next file to output file
end loop
close output...
Could you explain what it means to merge files?
Do you want to copy the contents of all the files into one file?