PHP Classes
elePHPant
Icontem

PHP File Renamer: Rename files in directory using several strategies

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (32)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2014-01-10 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 363 All time: 6,498 This week: 1,109Up
Version License PHP version Categories
file-renamer 1.3.0BSD License5.3.0PHP 5, Files and Folders
Description Author

This package can rename files in directory using several strategies.

It can traverse a directory recursively and rename files according to several different types of strategies.

Each strategy defines how each file should be renamed or not.

Currently several types of strategies are implemented like transliteration of names in different idioms and prefix names with a time values. Additional strategies may be registered.

The renamed files may be copied to a separate directory.

The class can also generate a report in CSV format about the renamed files.

Picture of Sergii Pryz
  Performance   Level  
Name: Sergii Pryz <contact>
Classes: 6 packages by
Country: Ukraine Ukraine
Innovation award
Innovation award
Nominee: 2x

Details
FileRenamer
===========

Introduction
------------
Console application for Renaming Files in the directory and subdirectories.

FileRenamer is:
* worked with different rename strategies e.g. microtime, transliteration to Latin of Ukrainian, Russian, Hungarian, Portuguese, German etc.
* provided ability registry new strategies
* created process report in .csv format
* implemented safety algorithm without removing source files. New directory with renamed files will be created.
* followed architecture Patterns
* based on PHP 5.3

Area of usage
-------------
Renaming files in the directory with custom algorithm without deleting original data
were renaming report is essential.

Examples
--------
1. For renaming files in the examples directory please run console command:
```
    php frcon.php -s tests/data/RenameMe -r mtime 
```	
2. To see all registered strategies please run:
```
	php frcon.php -l
```
3. Help can be found by using such command:
```
	php frcon.php -h
```	
Screenshots  
  • FileRenamer_v1_1_0_help.png
  • FileRenamer_v1_1_0_hash_strategy.png
  Files folder image Files  
File Role Description
Files folder imageconfigs (1 file)
Files folder imagedocs (1 directory)
Files folder imagesrc (1 file, 1 directory)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file CHANGELOG.md Doc. Updated release history.Renamed to upperCase.
Accessible without login Plain text file frcon.php Appl. Class source
Accessible without login Plain text file LICENSE.txt Doc. Renamed to upperCase.
Accessible without login Plain text file README.md Doc. Renamed to upperCase.

  Files folder image Files  /  configs  
File Role Description
  Accessible without login Plain text file strategies.ini Data Auxiliary data

  Files folder image Files  /  docs  
File Role Description
Files folder imageuml (2 files)

  Files folder image Files  /  docs  /  uml  
File Role Description
  Accessible without login Image file class.diagram.png Data Auxiliary data
  Accessible without login Plain text file class.diagram.xmi Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageFileRenamer (3 files, 2 directories)
  Plain text file Autoload.php Class New autoload due change script location.

  Files folder image Files  /  src  /  FileRenamer  
File Role Description
Files folder imageReport (2 files)
Files folder imageStrategy (5 files, 1 directory)
  Plain text file Console.php Class Only script location was changed.
  Plain text file Core.php Class Only script location was changed.
  Plain text file GeneralException.php Class Only script location was changed.

  Files folder image Files  /  src  /  FileRenamer  /  Report  
File Role Description
  Plain text file Csv.php Class Only script location was changed.
  Plain text file ReportInterface.php Class Only script location was changed.

  Files folder image Files  /  src  /  FileRenamer  /  Strategy  
File Role Description
Files folder imageTranslit (6 files)
  Plain text file AbstractStrategy.php Class Only script location was changed.
  Plain text file Hash.php Class Only script location was changed.
  Plain text file Microtime.php Class Only script location was changed.
  Plain text file StrategyInterface.php Class Only script location was changed.
  Plain text file StrReplace.php Class Only script location was changed.

  Files folder image Files  /  src  /  FileRenamer  /  Strategy  /  Translit  
File Role Description
  Plain text file General.php Class Only script location was changed.
  Plain text file German.php Class Only script location was changed.
  Plain text file Hungarian.php Class Only script location was changed.
  Plain text file Portuguese.php Class Only script location was changed.
  Plain text file Russian.php Class Only script location was changed.
  Plain text file Ukrainian.php Class Only script location was changed.

  Files folder image Files  /  tests  
File Role Description
Files folder imagedata (1 directory)
Files folder imagesrc (1 directory)
  Plain text file bootstrap.php Class UnitTest related.
  Accessible without login Plain text file phpunit.xml Data UnitTest related.

  Files folder image Files  /  tests  /  data  
File Role Description
Files folder imageRenameMe (1 file, 2 directories)

  Files folder image Files  /  tests  /  data  /  RenameMe  
File Role Description
Files folder imageFolder1 (1 file, 1 directory)
Files folder imageFolder2 (1 file)
  Accessible without login Plain text file test.txt Doc. Data for unitTests

  Files folder image Files  /  tests  /  data  /  RenameMe  /  Folder1  
File Role Description
Files folder imageFolder12 (1 file)
  Accessible without login Plain text file test1.txt Data Data for unitTests

  Files folder image Files  /  tests  /  data  /  RenameMe  /  Folder1  /  Folder12  
File Role Description
  Accessible without login Plain text file test12.txt Data Data for unitTests

  Files folder image Files  /  tests  /  data  /  RenameMe  /  Folder2  
File Role Description
  Accessible without login Plain text file test2.txt Data Data for unitTests

  Files folder image Files  /  tests  /  src  
File Role Description
Files folder imageFileRenamer (2 files)

  Files folder image Files  /  tests  /  src  /  FileRenamer  
File Role Description
  Accessible without login Plain text file BaseTest.php Test Only script location was changed.
  Accessible without login Plain text file CoreTest.php Test Only script location was changed.

 Version Control Unique User Downloads Download Rankings  
 94%
Total:363
This week:0
All time:6,498
This week:1,109Up