PHP Classes

File: frcon.php

Recommend this page to a friend!
  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: 9 years ago
Size: 650 bytes


Class file image Download
 * Console version of FileRenamer
 * @link
 * @license New BSD License

namespace FileRenamer;

// Autoload

// 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);