Login   Register  
PHP Classes
elePHPant
Icontem

File: frcon.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sergii Pryz  >  PHP File Renamer  >  frcon.php  >  Download  
File: frcon.php
Role: Application script
Content type: text/plain
Description: Class source
Class: PHP File Renamer
Rename files in directory using several strategies
Author: By
Last change: Updated Autoload and changed folder structure.
Date: 6 months ago
Size: 650 bytes
 

Contents

Class file image Download
<?php
/**
 * Console version of FileRenamer
 * 
 * @link        https://github.com/picamator/FileRenamer
 * @license     http://opensource.org/licenses/BSD-3-Clause New BSD License
 */

namespace FileRenamer;

// Autoload
include_once('./src/Autoload.php');

// identifing options
$shortopts  '';
$shortopts .= 's:'// source
$shortopts .= 'r:'// rename strategy
$shortopts .= 'l::'// strategy list
$shortopts .= 'd::'// destination path
$shortopts .= 'h';   // help   

// run
$strategies parse_ini_file('configs/strategies.ini'true);
$options    getopt($shortopts);

$console    = new Console($options$strategies);
$console->run();