![]() |
renaming files
Hi, I got an image gallery script, that requires that the images are called 0, 1, 2, 3, etc...
And I was thinking, if the photograph brings me 300 pics, it'll be REALLY boring to rename them all manually.. so I was wondering if it's possible to rename them with a script. Something like: PHP Code:
Would this be a good way of achieving that? And if so, how would I do it? |
For the actual renaming of the files, there is a really handy function:
rename() (PHP manual page)It might be good if you also use the glob() function to retrieve the list of files that need to be renamed. Wildhoney wrote an overview on this function in Traverse Directories the Easy Way with Glob() ! |
So something like this then?
PHP Code:
|
| All times are GMT. The time now is 01:24 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0