I need to randomly rename all files with the .gif extension in a directory. I was able to, using the following code:
$nome = substr(hash('md5',time()),0,10);
foreach (glob("*.gif") as $arquivo) {
rename($arquivo, $nome . basename($arquivo));
}
But the file that had the name "example1.gif" is called "d8030d37e9example1.gif", the next file "d8030d37e9example2.gif" ...
So the settings that I can not do are: