Renaming a 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
xLechugasx
Forum Newbie
Posts: 14
Joined: Wed Aug 28, 2002 9:56 am

Renaming a directory

Post by xLechugasx »

How can I rename a directory?
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

i don't believe there is a php function to do this but you can use shell_exec() to execute a command at the shell level
for Win/dos: shell_exec("rename dir1 dir2")
for *nix: shell_exec("mv dir1 dir2") (<-- i think. could someone double check to make sure that is the right *nix syntax?)
Post Reply