Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php rename files in directory

<?php rename ("/folder/file.ext", "newfile.ext"); ?>

The above doesn't rename the file within the folder, as you might assume, 
instead, it moves the file to whatever the PHP working directory is... 
Chances are you'll not find it in your FTP tree. 
Instead, use the following:

<?php rename ("/folder/file.ext", "/folder/newfile.ext"); ?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #rename #files #directory
ADD COMMENT
Topic
Name
4+4 =