Created
October 16, 2016 09:16
-
-
Save pingyen/26d427f3553430687c5757b8a95cb793 to your computer and use it in GitHub Desktop.
Simple Renaming Logic of iOS Photos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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