DeleteDirFiles( string frDir, string toDir, array arExept = array() );
Deletes all duplictate files from the specified director. These files are also located in another directory. The function does not work recursively.
|Parameter||Description||Available from version|
Absolute path to the directory, which files are checked for availablility in the directory, specified in the toDir parameter.
Absolute path to the directory, in which the files with names will be deleted that are found in the directory, specified frDir parameter.
|arExept||An array of exclusions. Contains short names of files which are not to be deleted.|
Examples of use
<? // delete from folder /temp1/ all files that are available in the folder /temp2/, // with exception of index.php file DeleteDirFiles( $_SERVER["DOCUMENT_ROOT"]."/temp2", $_SERVER["DOCUMENT_ROOT"]."/temp1", array("index.php") ); ?>
© «Bitrix24», 2001-2023