Hi
Job needs to run only if file is present on server. using execute command stage written command as wc -l filepath/filename and then conditions for output link are custom return output = 0 then no file link otherwise is in file output link.
but this logic is not working any suggestion with any other logic in execute command stage?
trigger job only if file exists
Moderators: chulett, rschirm, roy
I prefer the UNIX test commands, for example:
test -f filename returns true if the file exists, false otherwise
test -s filename if the file exists and is not empty, false otherwise
Those are my two ways I use quite a bit. Also note that you check the status of the command, not the output.
test -f filename returns true if the file exists, false otherwise
test -s filename if the file exists and is not empty, false otherwise
Those are my two ways I use quite a bit. Also note that you check the status of the command, not the output.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Why not use a WaitForFile activity in your sequence, with a really short timeout (perhaps 1 second)? The OK trigger fires if the file exists, the Failure trigger fires if the wait times out.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.