Renaming files to uppercase
Posted: Tue Feb 03, 2015 3:11 pm
For some reason, I can't seem to get this working with regex - here's what I'm trying to do:
<rename inputFilesVariable="${dstFiles}" whenFileExists="overwrite" searchPattern="(.*)\.(.*)" patternType="regex" replaceWith="${Upper('$1')}.$2" caseSensitive="true" version="1.0" />
When I try and run this, it doesn't fail, but it doesn't actually rename the files, either. It reports "0 file(s) were renamed successfully" and continues the rest of the script.
Right now, I'm starting to think that the Upper() function isn't compatible with regex replace - that or I'm making a mistake that I'm just not seeing.
Thanks ahead of time for your help.
<rename inputFilesVariable="${dstFiles}" whenFileExists="overwrite" searchPattern="(.*)\.(.*)" patternType="regex" replaceWith="${Upper('$1')}.$2" caseSensitive="true" version="1.0" />
When I try and run this, it doesn't fail, but it doesn't actually rename the files, either. It reports "0 file(s) were renamed successfully" and continues the rest of the script.
Right now, I'm starting to think that the Upper() function isn't compatible with regex replace - that or I'm making a mistake that I'm just not seeing.
Thanks ahead of time for your help.