1. <?php
  2. $originalDirectory = 'images';
  3. $modifiedDirectory = 'result';
  4. $files = array_diff( scandir( $originalDirectory ), array( '.', '..' ) );
  5. foreach( $files as $file ) {
  6. $startPath = $originalDirectory.'/'.$file;
  7. $finalPath = $modifiedDirectory.'/'.$file;
  8. if( !file_exists( $finalPath ) ) {
  9. exec( 'greenscreen -t 22 -a 0 -b white '.$startPath.' "" '.$finalPath.'' );
  10. }
  11. }
Comments powered by Disqus