I am new to PHP and have not yet learned all the syntax and commends but was wondering if an easy script can be made to copy files of the same name from one directory over to another directory thru a PHP script

in other words if I have 2 folders

1 named Folder1
the other named Folder2

and I wanted to copy files that have the same name from folder1 to folder 2 and have it replave the files currently in folder2 with the ones it copies from folder1 could this be done


Folder1 has files names


and folder 2 has the same files but older non updated versions ... what script could I use to copy the ones in Folder1 and replace the existing ones in folder2

Any help would be most appreeciated

I am trying to learn from all this and use this for a project at the same time ...

Thank you so much anyone that spends a few minutes of thier time to help with this


Open the first file and replace the second files contents... you really need to use a database...

You already have an open thread on this question. Please abide by the rules regarding multiple postings of a single question.

Closing this one.