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

Post Reply
MichaelG
Newbie
Posts: 4
Joined: Wed Nov 15, 2017 2:37 pm

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

Post 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?
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

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

Post 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
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
MichaelG
Newbie
Posts: 4
Joined: Wed Nov 15, 2017 2:37 pm

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

Post 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?
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

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

Post 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?
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
MichaelG
Newbie
Posts: 4
Joined: Wed Nov 15, 2017 2:37 pm

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

Post by MichaelG »

Here are the properties of the app:
inject prob.PNG
inject prob.PNG (59.22 KiB) Viewed 11590 times
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

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

Post by gabrielp »

I think it might be that preceding "\\". Is there another way it could be addressed? like "file:///" or "/Volumes/whatever"?
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Arthur
Member
Posts: 113
Joined: Sat Sep 09, 2017 11:58 pm
Location: Yateley, UK

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

Post 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.
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

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

Post by jan_suhr »

Every backslash has to be escaped, so your initial \\ has to be written \\\\
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
MichaelG
Newbie
Posts: 4
Joined: Wed Nov 15, 2017 2:37 pm

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

Post 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.
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

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

Post 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.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Post Reply