Esgrimidor:
--------------------------------------------------------------------------------
Perhaps an autohotkey or a batch file?
--------------------------------------------------------------------------------
Sorry, but those are not my languages.
Just to show you how simple it could be:
<?php
/**
* run.php
*/
/**
Folder structure:
ROOT/run.php
ROOT/data.csv
ROOT/files/file_01.txt
ROOT/files/file_02.txt
ROOT/files/file_03.txt
ROOT/new-files/
*/
// show some errors
error_reporting(E_ALL);
ini_set('display_errors', 1);
// set your variables here
$folder = 'files';
$newFolder = 'new-files';
$suffix = 'txt';
$csv = 'data.csv';
$csvDelim = ';';
// do nothing below this line
$files = glob($folder.'/*.'.$suffix);
$csvRows = file($csv);
// build the search and replace arrays
foreach($csvRows as $row)
{
list($search[], $replace[]) = explode($csvDelim, $row);
}
// the action
foreach($files as $file)
{
$fileContent = file_get_contents($file);
$fileContent = str_replace($search, $replace, $fileContent);
file_put_contents($newFolder.'/'.basename($file), $fileContent);
}
?>
--
<http://forum.pspad.com/read.php?2,64988,65003>
PSPad freeware editor http://www.pspad.com