Rename fails if filename contains ( or )

Post variable and regex related tips, questions.

Rename fails if filename contains ( or )

Postby melvin » Tue Dec 30, 2014 5:19 pm

User support request:

I'm trying to rename a file 'REPORT (NEW)01.pdf' to Report New01.pdf, and the error message read "File not copied, Source file date is older than Target file date.. " so I checked the "ignore filestamp", but it still won't rename the file. I'm wondering if it's because the original filename has parentheses in it '(NEW)' I don't control the original filename and if you have suggestions as to how to get this to rename.
melvin
Site Admin
 
Posts: 979
Joined: Thu May 25, 2006 10:20 am
Location: Santa Barbara, california

Re: Rename fails if filename contains ( or )

Postby melvin » Tue Dec 30, 2014 5:20 pm

Seems like ( and ) are the problem. They have to be escaped with \

Use this in the rename field:
REPORT \(NEW\)01.pdf<REPLACE>Report New01.pdf

we created a pdf with same name and it worked..
melvin
Site Admin
 
Posts: 979
Joined: Thu May 25, 2006 10:20 am
Location: Santa Barbara, california


Return to Variables and Regular Expressions

Who is online

Users browsing this forum: No registered users and 2 guests

cron