Skip to content

Instantly share code, notes, and snippets.

@pingyen
Created October 16, 2016 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pingyen/26d427f3553430687c5757b8a95cb793 to your computer and use it in GitHub Desktop.
Save pingyen/26d427f3553430687c5757b8a95cb793 to your computer and use it in GitHub Desktop.
Simple Renaming Logic of iOS Photos
<?php
foreach (scandir('.') as $file) {
if ($file[0] === '.') {
continue;
}
rename($file, substr($file, 0, -4) . ' 1' . substr($file, -4));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment