Update: the second code works, only that it seems, that the date application is somewhat postponed.
First the current date is shown, but when the folder is completely copied, the original date is applied.
[quote="abr"]only that it seems, that the date application is somewhat postponed.
First the current date is shown, but when the folder is completely copied, the original date is applied.[/quote]
Folder dates change whenever anything added, removed or renamed below them. So if the folder date was set before everything below it had been copied, the date would immediately be changed back to the current day/time. That is why it has to be set at the end of the operation.