|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQFTE ANT, Files by TIMESTAMP |
« View previous topic :: View next topic » |
Author |
Message
|
bobbee |
Posted: Tue May 14, 2013 5:41 pm Post subject: MQFTE ANT, Files by TIMESTAMP |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
I am trying to write an ANT script for a Directory Monitor that will return a list of files by TIMESTAMP. The oldest file first and so forth. Once I have the fileset I want to them loop through the fileset and send the files throught FTE one at a time. Everything works from a prior project. I cannot seem to get the timestampselector coded right. Anyone have a suggestion. The ID and REFID are def not working. I do not think this represents the files with the timestampselector applied. Here is the code snippette:
<timestampselector outputsetid="most.recent.logs" count="30"
age="eldest">
<path>
<fileset dir="${SRCDIR}" id="MYFILES">
<include name="*" />
</fileset>
</path>
</timestampselector>
<for param="file">
<path>
<fileset refid="MYFILES" />
</path>
<sequential>
.
.
. |
|
Back to top |
|
 |
bobbee |
Posted: Wed May 15, 2013 5:44 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
OK, figured it out, just sharing now.....................
<!-- ****************************************************** / -->
<!-- Build the package list of files from the target directory by / -->
<!-- TIMESTAMP / -->
<!--********************************************************** / -->
<timestampselector property="packageList" count="9999" pathsep=","
age="eldest">
<path>
<fileset dir="${SRCDIR}" casesensitive="false" includes="*" />
</path>
</timestampselector>
<!-- -->
<!-- Set up a FOR loop to iterate through the package list one -->
<!-- file at a time performing a ftemove with a timeout. If the -->
<!- transfer ID returns an error the trasfer process will terminate -->
<echo message="Eye Catcher #3" />
<for param="file" list="${packageList}">
<sequential>
<echo message="Eye Catcher #4" />
<!-- unset the value in the filename holding variable -->
<var name="ForFileName" unset="true" />
<basename property="ForFileName" file="@{file}" />
<echo>Filename === ${ForFileName}</echo> |
|
Back to top |
|
 |
Michael Dag |
Posted: Thu May 16, 2013 2:43 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
glad you solved it, personally i find ANT for these filetransfer tasks almost cruel...  _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
bobbee |
Posted: Thu May 16, 2013 2:49 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
Yup Agree, as I told someone else, when trying to read the ANT doc it reminds me of Beatlejuice...................
"This thing reads like Stereo instructions." |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|