PHPBuilder - Empty Directory Create



RSS Twitter
Snippets File Management

Empty Directory Create

by: kakchan
|
August 26, 2002

Version: 1.0

Type: Full Script

Category: File Management

License: GNU General Public License

Description: This Script simply crete empty dir from a folder that contain the same directoyes but full;) if you want to contact my my web community is on www.dawnofdreams.org



<?php
// Silvio Terzi kakchan@italyjapan.com www.dawnofdreams.org www.japanworlds.it
$path = "**path**"; // source folder = not empty folders
$dir=opendir($path); 
while ($file2 = readdir($dir)) { 
if ($file2 != ".." AND $file2 != ".") {
$dirname = "**path**" . $file2; // target folder = empty folders
mkdir($dirname, 0777);
}
} 
closedir($dir);
echo "directory created"; 
?>

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
kakchan

Comment:



Comment:

(Maximum characters: 1200). You have characters left.