hi i am building a website. i have about 900 folders which will be going in my root directory. each folder will have 4 files in it. i need these 4 files in all of the 900 folders. i can only see how to do it by copying and pasting the 4 files into each folder 1 by 1. this is slow and tedious. is there a way so that i can paste them to all 900 folders at the same time? so then all 900 folders have 4 files in each one. or maybe a script to do this. thanks steve
<?php $files = array('file1','file2','file3','file4'); if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if (is_dir($file)) { copy($files[0], $file . '/' . $files[0]); copy($files[1], $file . '/' . $files[1]); copy($files[2], $file . '/' . $files[2]); copy($files[3], $file . '/' . $files[3]); } } closedir($handle); } ?> PHP: Should work