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 

How do I use a variable to select the files for a copy task?

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions
View previous topic :: View next topic  
Author Message
rsamoose



Joined: 27 Oct 2008
Posts: 28
Location: Bethlehem, PA

PostPosted: Wed Jun 23, 2010 12:01 pm    Post subject: How do I use a variable to select the files for a copy task? Reply with quote

What is the best way to copy/move files based on dynamic substring?

For example I have files following the naming convention:
HIDRP1_20100623-124501_ABCD_A55_.csv
HIDRP1_20100623-124501_ABCD_001_.pdf
HIDRP1_20100623-124501_ABCD_002_.pdf
HIDRP1_20100623-124501_ABCD_003_.pdf
HIDRP1_20100623-124501_ABCD_004_.pdf
HIDRP1_20100623-124501_ABCD_005_.pdf
GUDRP5_20100622-164501_ABCE_A55_.csv
GUDRP5_20100622-164501_ABCE_001_.pdf
GUDRP5_20100622-164501_ABCE_002_.pdf
GUDRP5_20100622-164501_ABCE_003_.pdf
GUDRP5_20100622-164501_ABCE_004_.pdf
GUDRP5_20100622-164501_ABCE_005_.pdf
Note the first 6 characters/digits change on a daily basis.

I would like to create a task to move all files with the same first 6-20 characters into a fixed directory (which is used for zipping- I know how to do that). My understanding is that I would need to use a variable to capture the first 6 characters (from a directory loop::filename) then use that variable to select the files of the copy task.

How do I load a variable to select the files for a copy task, then use it to move the files?

Thank you.

========
My solution....
I created a script which reads the filename from a File monitor task.
Perform the necessary string manipulation in my script.
Set the Filename parameter (#3) for a copy task to my manipulated string.
Call the copy task from the script.

Never underestimate a good night's sleep...
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
Page 1 of 1

 
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