Page 1 of 1
how to check if file exists
Posted: Wed May 31, 2017 2:47 pm
by jeisma
hi,
the op in this link pretty much describe what i need.
viewtopic.php?p=313299
however, i could not find execute command stage in my pallet.
any idea how to check if file exists, and rename afterwards before running the job runs?
Posted: Wed May 31, 2017 5:23 pm
by ray.wurlod
The Execute Command activity is only in your Palette if a Sequence job is in focus in your Designer client. So you could do the check in the sequence that controls your job.
You could also use a before-job subroutine, but the only alternatives this gives you are to allow the job to run or to abort the job.
Posted: Thu Jun 01, 2017 8:01 am
by UCDI
You can make an execute command routine in C++ to use in your parallel jobs for this sort of thing.
it is literally just this function:
Code: Select all
int wrapper(string s)
{
system(s);
//parse and return a value, 0 or 1 maybe, or the output of the system command
return (something);
}
There are other ways. This one is just really simple.
Posted: Thu Jun 01, 2017 8:42 am
by jeisma
thank you so much for the tips.
Posted: Wed Jun 07, 2017 12:35 pm
by FranklinE
Under parallel job properties, on the General tab, the Before-job subroutine drop-down includes DSWaitForFile. I've not used it, but your manuals should have what you need to use it.