Most recent file variable

Post variable and regex related tips, questions.

Most recent file variable

Postby melvin » Wed Sep 24, 2014 8:22 am

User support request:
We need to create a task that gets passed on the most recent file (given a pattern) in a particular folder. So, at the time when I run a given task, I’d like to pass as a parameter the name of that file. What’s the recommended approach to this?
melvin
Site Admin
 
Posts: 979
Joined: Thu May 25, 2006 10:20 am
Location: Santa Barbara, california

Re: Most recent file variable

Postby melvin » Wed Sep 24, 2014 8:23 am

Use a File monitor task.
Task to Run = none
Sort Ascending by Timestamp (or descending?)

After task runs, use the FirstFileName variable. This variable should hold the most recent file name.
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 1 guest

cron