Changing directoryName

I have a file named “change_directoryName.php”.
There is a directory named “old_directoryName” in the directory.

I like to put some code into the file “change_directoryName.php” for changing the directory name from “old_directoryName” to “new_directoryName”.

The would-be code below doesn’t work correctly, but I hope it shows what I want to try,

[b]would-be code[/b]

change_directoryName("old_directoryName", "new_directoryName");
rename('old_directoryname/', 'new_directoryname/');

It may benefit you to search php.net before posting :slight_smile:
http://php.net/manual/en/function.rename.php

The PHP documentation has a full list of all the filesystem functions.