Cybervanes
asked on
php move all files from one folder to another
hello again...
i'm needing to add all contents from one folder to another using php. then delete the source.
source folder holds over 6,000 files..
does anybody have any ideas?
Ive tried the following with no luck..
i'm needing to add all contents from one folder to another using php. then delete the source.
source folder holds over 6,000 files..
does anybody have any ideas?
Ive tried the following with no luck..
<?
$directoryToMove = opendir("../folder1/innerFolder/");
// get each entry
while($entryName = readdir($directoryToMove)) {
rename("sourcePath;", "newPath/");
}
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked Good Thank You!
6,000 files is probably no trouble at all unless these are gigantic files.