Quote:
Originally Posted by ghostdog74
If you have Python, you can try my script called File renamer (see my sig last link) eg usage:
[code]
# ls -1
MYReport Report crtjan0921-31 (3797 found).csv
# python filerenamer.py -p "^.* .* (crt.*) \(.*$" -e "\1.csv" -l "*.csv"
==>>>> [ /home/MYReport Report crtjan0921-31 (3797 found).csv ]==>[ /home/crtjan0921-31.csv ]
|
I tried using your script but apparently I'm doing something wrong.
I enter this;
# python filerenamer.py -p "^.* .* (crt.*) \(.*$" -e "\1.csv" -l "*.csv"
I get the following output but file names are not changed. Is there something that I have to specify in order to actually update the files name?
==>>>> [ /var/www/kb_file/newdata/MYReport Report crt2009apr1-10 (3613 found).csv ]==>[ /var/www/kb_file/newdata/crt2009apr1-10.csv ]
==>>>> [ /var/www/kb_file/newdata/MYReport Report crt2009feb1-10 (4115 found).csv ]==>[ /var/www/kb_file/newdata/crt2009feb1-10.csv ]
==>>>> [ /var/www/kb_file/newdata/MYReport Report crtjan0911-20 (3156 found).csv ]==>[ /var/www/kb_file/newdata/crtjan0911-20.csv ]
==>>>> [ /var/www/kb_file/newdata/MYReport Report crt2009jan1-10 (2478 found).csv ]==>[ /var/www/kb_file/newdata/crt2009jan1-10.csv ]
==>>>> [ /var/www/kb_file/newdata/MYReport Report crtjan0921-31 (3797 found).csv ]==>[ /var/www/kb_file/newdata/crtjan0921-31.csv ]
Thanks for your help!!