Exit task sequence based on variable value

Post variable and regex related tips, questions.

Exit task sequence based on variable value

Postby melvin » Mon Feb 10, 2014 2:53 pm

User support request:

Is it possible to exit a task sequence based on a variable? I want to perform a directory listing and if the number of files is zero then I do not want to continue the rest of the tasks. This is in the latest version of 9, although I have 10, I have yet to port all my 9 scripts to version 10.
melvin
Site Admin
 
Posts: 979
Joined: Thu May 25, 2006 10:20 am
Location: Santa Barbara, california

Re: Exit task sequence based on variable value

Postby melvin » Mon Feb 10, 2014 2:54 pm

Exiting a task sequence based on variable is on our 10.x to do list in one of the upcoming patch updates.
You best option at this point would be to use a FileMonitor task and select the option “run task if total files > 0 “ . Select task to run = none.
If number of files = 0, then exit code = 0. If number of files > 0, then exit code = –100. i.e. you can exit the task sequence based on the file monitor task exit code.
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