dynamically change name of specific directory

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lilsavgrad01
Forum Newbie
Posts: 9
Joined: Thu Jun 09, 2005 9:50 am

dynamically change name of specific directory

Post by lilsavgrad01 »

Hello,

I need to dynamically change the name of a dynamically chosen directory by a user through php.

Does anyone know if php has a way of changing specific directory names?
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Use opendir to open a directory and traverse through all files/directories in it using the readdir function using filetype you can know if its a directory or not - until you find your specific directory and change the directory name using the rename function.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Post Reply