Skip to main content
Known Participant
June 7, 2009
Question

Rename folder question

  • June 7, 2009
  • 4 replies
  • 986 views

I create and upload files to a folder named "files". How would I create a form that let's me input a new folder name, and when I hit a Submit Button, the folder "files" is renamed to the new name I input into form? I am using PHP.

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

June 7, 2009

I think that the rename php function would do the job. Let's say you have the post of the folder name comes from the form as the value of $_POST['folder'] .

With the mentioned function you can create folder easy

rename ('files',''.$_POST['folder'].'' );

Regards

Zoli

Participating Frequently
June 7, 2009

You would need to incorporate some of php's file system functions into your script:

http://www.php.net/manual/en/ref.filesystem.php

Known Participant
June 7, 2009

I looked there before I asked the question here.

Participating Frequently
June 7, 2009

Volsupporter wrote:

I looked there before I asked the question here.

Then what specifically is your question? What do you not understand about the file system functions?