I am wondering if there is a way to recursively change file extensions from php within a directory and its subdirectories and subsubdirectories?
I have inherited a project that was on a windows server and somehow all pdf files have been uploaded with the extension .pdf.pdf Example filename.pdf.pdf
I am migrating the project to a LAMP server.
I would like to rename the files if possible to filename.pdf - They sit within directories and sub and subsubdirectories.
Is this something that is do-able at all? I am completely at a loss.