I need to rename more than a thousand .bmp files located in a "screen" directory.
Files to be renamed follow this logic "2017-08-06 19-29-58.bmp", "2017-08-06 19-29-59.bmp", "2017-08-06 19-30 -00.bmp "... according to your creation data.
I already have a name for each of these files, but the new names do not follow a sequence, for example: the file "2017-08-06 19-29-58.bmp" will now be called "White Set. bmp ", the following file" 2017-08-06 19-29-59.bmp "will be renamed to" Black Set.bmp ", the next file" 2017-08-06 19-30-00.bmp "will be renamed "Red Set.bmp", and so on.
I do not know how to specify through PHP code so that the web page checks all files listed in the "screen" directory and renames them according to my list of already defined names (array).