hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RegEx Issue Help Please!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions
View previous topic :: View next topic  
Author Message
jkrfs



Joined: 27 Mar 2010
Posts: 47

PostPosted: Tue Jun 15, 2010 2:45 pm    Post subject: RegEx Issue Help Please! Reply with quote

I have a copy file task which I am using to rename the file as I copy.

The file name is :
TRAN man 061610.xls

the date changes, each day.

In rename file I have
BL NPB_LTD $%previousBusinessDate%$.xls

previousBusinessDate is a variable I have instantiated.

What do I have to include in the Filename and Rename Filename options so that it completely renames the file when it copies it over?

Everything I have tried has not worked!
Thanks
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 635
Location: Santa Barbara, california

PostPosted: Tue Jun 15, 2010 10:29 pm    Post subject: Reply with quote

1) make sure 'rename' option is selected. This is very commonly overlooked by many users.

2)
filename field:
TRAN man $%DATE::ppddyy%$.xls

rename field:
BL NPB_LTD $%previousBusinessDate%$.xls
Back to top
View user's profile Send private message Send e-mail
jkrfs



Joined: 27 Mar 2010
Posts: 47

PostPosted: Wed Jun 16, 2010 4:14 am    Post subject: Reply with quote

It worked! Thank you Melvin!

I have a quick question: is there a way to use rename file and copy the file and not completely move the file?
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Wed Jun 16, 2010 1:33 pm    Post subject: Reply with quote

you mean copy and simultaneosly rename? no , it is either copy/move/ or rename.

your best option would be to copy the files to another folder and then do the rename. i.e. 2 steps.
Back to top
View user's profile Send private message
jkrfs



Joined: 27 Mar 2010
Posts: 47

PostPosted: Wed Jun 16, 2010 1:37 pm    Post subject: Reply with quote

Good thinking...thanks!
Back to top
View user's profile Send private message
jkrfs



Joined: 27 Mar 2010
Posts: 47

PostPosted: Fri Jul 09, 2010 2:09 pm    Post subject: Reply with quote

I am trying to rename a file that has a white space in it, for example:

Filename: Test File.zip
RenameFile: The File.zip

But because of the white space, it just moves the file as is: Test File.zip

Im sure this is an easy solution but its racking my brain right now!
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 635
Location: Santa Barbara, california

PostPosted: Sat Jul 10, 2010 2:33 pm    Post subject: Reply with quote

what are:
actual filename:
your filename field entry:
rename field entry:

make sure you selected option: RENAME
Back to top
View user's profile Send private message Send e-mail
jkrfs



Joined: 27 Mar 2010
Posts: 47

PostPosted: Mon Jul 12, 2010 5:51 am    Post subject: Reply with quote

Actual filename: FSI-954946 (Ind).pdf
Filename field: FSI-954946 (Ind).pdf
Rename Filename field: CASH file $%previousBusinessDate%$.pdf

I have the option to: rename files

If I run it as is, it just copies the file with the same file name, and not renaming it.
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 635
Location: Santa Barbara, california

PostPosted: Mon Jul 12, 2010 5:13 pm    Post subject: Reply with quote

The issue is the brackets ( ) in the filename. The rename is done using Regex. ( and ) are metacharacters for grouping in Regex and this is causing it to fail. The ( and ) may have to be escaped for this to work. Will have to research this later and get back to you.
Back to top
View user's profile Send private message Send e-mail
jkrfs



Joined: 27 Mar 2010
Posts: 47

PostPosted: Tue Jul 13, 2010 11:55 am    Post subject: Reply with quote

Hmm, I did not take that into consideration. I tried using escape char \ before each bracket but it didnt work.
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Thu Jul 15, 2010 2:30 pm    Post subject: Reply with quote

I tried \ too without any luck. still looking.
Back to top
View user's profile Send private message
jkrfs



Joined: 27 Mar 2010
Posts: 47

PostPosted: Mon Jul 19, 2010 12:52 pm    Post subject: Reply with quote

Any other possibilities to fix this?
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 635
Location: Santa Barbara, california

PostPosted: Mon Jul 19, 2010 5:29 pm    Post subject: Reply with quote

which version are you using?
Back to top
View user's profile Send private message Send e-mail
jkrfs



Joined: 27 Mar 2010
Posts: 47

PostPosted: Tue Jul 20, 2010 4:25 am    Post subject: Reply with quote

8.39
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Wed Jul 21, 2010 12:25 pm    Post subject: Reply with quote

unfortunately, we have not been able to figure this out. escaping with \ should work but does not..

There is nothing specific in our code that can be done to fix this. We just call the java regex functions for the filename filter and rename functions. i.e. unfortunately, there is no workaround to fix this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group