HosipLan

Untitled

Sep 16th, 2011
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.22 KB | None | 0 0
  1. foreach (Nette\Utils\Finder::findFiles('*')->from($directory) as $file) {
  2.     if (substr($file->getBasename(), -2) !== ';1') {
  3.         continue;
  4.     }
  5.  
  6.     rename($file->getPathname(), $file->getPath() . '/' . $file->getBasename(';1'));
  7. }
Advertisement
Add Comment
Please, Sign In to add comment