File Rename Script

File Rename Script is used to change one file name to another file name and will not change inside content at txt file.

Demo :




Example :

Just type new file name at New File Name text box field and then click change button and now will be changed in the above old file name.

Code :

Following code is use to rename file from old .txt file if you need code to copy and use to your website.


  <?php
  $oldFile = "";
  $new_file_name = "";
  if (file_exists($oldFile))
  {
    rename ($oldFile, $new_file_name) or die("Cannot move/rename file '$oldFile'");
  }
  ?>

In the above file_exists() function is use to check file available on server and rename () function is used to re name a old file name to new file name but will not change inside content.

Free Download Script :

If you need File Rename Script click and download from following link.

Download




Content