Renaming files to uppercase

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1

kprice

Posts: 2
Joined: Fri Aug 08, 2014 3:34 pm

Post by kprice » 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(&apos;$1&apos;)}.$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.

Support_Rick

Support Specialist
Posts: 590
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Tue Feb 03, 2015 6:14 pm
The Rename Task doesn't work this way.

If you look into the Documentation (Blue ?) for the Rename Task, it notes at the bottom,
If you want to rename multiple files, then leave the Input File and New Name blank. On the Advanced tab of the Rename Task, add a File Name Prefix and/or File Name Suffix. Then define the File Set of files to rename by clicking the Action link in the sub-menu and selecting the Add a File Set menu item.
You might be able to do a ForEach loop across the file list and work with the files individually (rename each or call the command line var to rename) as an option.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts Page 1 of 1