Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1>Renaming tool</h1>
- <?php
- $input_location = 'input/';
- $input_data = 'rename.csv';
- $file_handle = fopen($input_data, "r");
- while (!feof($file_handle) ) {
- $line_of_text = fgetcsv($file_handle, 1024);
- rename($input_location.$line_of_text[0], $input_location.$line_of_text[1]);
- }
- echo('renamed all files');
- fclose($file_handle);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement