Scenario : In our source directory, we want to select all text files and move to the target directory.
All text files names begin with “File” and have a number appended.
For Day 1, the file to move is called “File2.txt”.
On Day 2, the text file to move is called “File187.txt”.
The file to move will always be a text file that begins with “File”. There will only be 1 text file to move at a time. How can we achieve this? Also we want to move the files not copy.
To accomplish your requirement,follow are the high level steps :
1.Create the file event activity and in File Include Criteria field write File*.txt.
2.Bind this event with the process flow using Event Registry.
3.Now in the process designer, double click on the source activity.
4.From the bottom panel, edit the property EventContextEnabled to true.(It will pick the file from the event base location not from the location you provide in the source activity).
5.If you want to delete the file that is picked from the event base location:
a.open the source activity.
b.Expand the advanced properties of source activity, check the field "Delete on success".
6.Now to pass file name to target , refer to the link : http://support.adeptia.com/entries/21280958-passing-source-file-name-to-target
7.Also if you want to add time stamp on the name of the target file, please refer to the link : http://support.adeptia.com/entries/21277487-setting-current-date-in-context-variable