If you're on *nix.$>mv old_name new_name
If you're bent on a Perl solution - use the portable (and already installed) File::Copy module.
Ripped verbatim from File::Copy's POD:
Obviously, you'll want the move() function.use File::Copy; copy("file1","file2"); copy("Copy.pm",\*STDOUT);' move("/dev1/fileA","/dev2/fileB");
Incidentally, you may wish to try typing "Renaming" in the search box at the top of every page next time.
Update: Whoops. I missed the fact that you
could do a straight rename("OLDNAME", "NEWNAME"); My bad
Update 2: Aristotle++ Don't use the rename() - its abilities vary from system to system. read
perldoc -f renamefor the full info.
cheers
davis
Is this going out live?
No, Homer, very few cartoons are broadcast live - it's a terrible strain on the animator's wrist
In reply to Re: Renaming Direcotries
by davis
in thread Renaming Directories
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |