in reply to moving files from folder1 to folder2
Moving a file is effectively the same as renaming a file. Perhaps slightly different point of view on the user's side of things, but to the machine, moving and renaming are one and the same.
Excerpt from perldoc -f rename:
rename OLDNAME,NEWNAME Changes the name of a file; an existing file NEWNAME will be clobbered. Returns true for success, false otherwise.
This means you can do something like this in your code:
rename( '/home/fred/public_html/temp/image.gif', '/home/fred/public_html/final/image.gif' ) or die( "rename failed: $!" );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: moving files from folder1 to folder2
by ambrus (Abbot) on May 15, 2004 at 18:01 UTC |