/** * Overload resetFilename() to call resetFilename() on all the children, too. * Pass renamePhysicalFile = false, since the folder renaming will have taken care of this */ protected function resetFilename($renamePhysicalFile = true) { parent::resetFilename($renamePhysicalFile); if($this->ID && ($children = $this->AllChildren())) { $this->write(); foreach($children as $child) { $child->resetFilename(false); $child->write(); } } }