Is there an easy way in C to combine multiple files into one file? The filenames will be generated by another tool and will be unique. I am current accomplishing this task by manually inputting the unique filenames into a file and using that file's contents as the files that should be opened and copied to a new destination file. Is there any way to have the program to automatically copy all files in a particular directory or all files with a particular extension without me manually typing these filenames into another file?