Page 1 of 1

How do I make a decision based on if a folder exists in my FLow.

Posted: Wed Nov 15, 2017 2:47 pm
by MichaelG
I am placing a file into a job using Set Hierarchy Path, but If the job doesn't exist I don't want to place it. Because currently, the Set Hierarchy path just places it and creates any missing folders, and that would throw off my workflow. Any suggestions or other things I can try?

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Wed Nov 15, 2017 3:49 pm
by gabrielp
You can try to inject it (or https://www.enfocus.com/en/appstore/product/inject-lite) to see if its there before you do that operation

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Wed Nov 15, 2017 4:58 pm
by MichaelG
Thank You. That does seem like it should solve my problem. I did install Inject Lite and am using it, but I am getting an error in my flow- "Error in line 101 of script : Error. Trying to access undefined member '1'". Any idea what may have caused this?

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Wed Nov 15, 2017 6:48 pm
by gabrielp
MichaelG wrote:Any idea what may have caused this?
Not really sure. Can you post a screenshot of the app/script properties you are using?

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Wed Nov 15, 2017 7:27 pm
by MichaelG
Here are the properties of the app:
inject prob.PNG
inject prob.PNG (59.22 KiB) Viewed 11633 times

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Wed Nov 15, 2017 8:53 pm
by gabrielp
I think it might be that preceding "\\". Is there another way it could be addressed? like "file:///" or "/Volumes/whatever"?

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Thu Nov 16, 2017 12:38 pm
by Arthur
gabrielp wrote:I think it might be that preceding "\\". Is there another way it could be addressed? like "file:///" or "/Volumes/whatever"?
\\ - double backlash is for a network path.
If the file sits on a network location - pointing to it with double backlash or going per Network and the actual device on the network, will always result in the path starting with '\\'
Correct me if I am wrong.

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Fri Nov 17, 2017 6:27 pm
by jan_suhr
Every backslash has to be escaped, so your initial \\ has to be written \\\\

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Wed Nov 22, 2017 6:52 pm
by MichaelG
I got it to work, it ended up needing to be the Forward slash instead of the backlash (//workserver/work/jobs/) which ended up working. It must have something to do with the way Inject Lite uses it, because it works fine as \\workserver\work\jobs\ in Switch. Thanks for your help.

Re: How do I make a decision based on if a folder exists in my FLow.

Posted: Sat Nov 25, 2017 12:58 am
by gabrielp
MichaelG wrote:I got it to work, it ended up needing to be the Forward slash instead of the backlash (//workserver/work/jobs/) which ended up working. It must have something to do with the way Inject Lite uses it, because it works fine as \\workserver\work\jobs\ in Switch. Thanks for your help.
Sorry for the hassle but thanks for posting the solution.