PhotoDune

Edit files (i.e. change file name) through custom page options?

2157 posts
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Exclusive Author
  • Germany
  • Has been a member for 4-5 years
  • Interviewed on the Envato Notes blog
+4 more
crozer says

Hey,
I was wondering if it could be possible to create a function for the custom admin page, that allows the user to write i.e. 99, and use this number to edit a file’s name i.e. single-99.php

So by writing 99, the user told the function to add that number to single- so that it turns out single-99.php. Any ideas if this could be possible?

Thanks!

1764 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Germany
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Referred between 1 and 9 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
BroOf says

There is a solution to rename files with PHP :

<?php rename("old_test.php","new_text.php");
?>

And this is the syntax:

<?php rename("OLD FILE NAME","NEW FILE NAME");
?>
by
by
by
by
by