Welcome To Support Community

Pipeline Pilot

Advanced Search
Ask Search:
Leela214Leela214 

Create new folder and other question

Hi All,

Would anyone know if there is component that could create folder if it is not existed and using the name I specified? 
 
How could I let the program knows if I choose a file from a specific folder(ex ABC folder), then it should run the ABC_protocol. If I choose a file from XYZ folder then it would run the XYZ protocol.

Will appreciate any input!
 
Best Answer chosen by Leela214
LynnLynn (Accelrys) 
Hello,

Most Writer-type components will create any specified missing subfolders in the specified output path, so writing the file to the desired destination path should do what you need without a special separate call to create the folder.

For selection, what mechanism are you using?  Are you setting it up using a Work/Form protocol with the Reporting Collection and having the user select the file and then Submit the selection, or are you using something else?

There are several options but you might consider having a single consistent call to a controller protocol that takes the folder name as a variable and calls the desired folder-specific protocol as a shortcut.  

Best wishes,
Lynn
 

All Answers

LynnLynn (Accelrys) 
Hello,

Most Writer-type components will create any specified missing subfolders in the specified output path, so writing the file to the desired destination path should do what you need without a special separate call to create the folder.

For selection, what mechanism are you using?  Are you setting it up using a Work/Form protocol with the Reporting Collection and having the user select the file and then Submit the selection, or are you using something else?

There are several options but you might consider having a single consistent call to a controller protocol that takes the folder name as a variable and calls the desired folder-specific protocol as a shortcut.  

Best wishes,
Lynn
 
This was selected as the best answer
Leela214Leela214
Hi Lynn,

Thank you for the help! I tried excel writer component and it did create a subfolder if the folder wasn't there already. I was amazed by it. Didn't know it could do that.

As for the selection question, I'm not really sure how to answer your question. But, I have attached some images and hope that could make it more clear.

In the first image, user will select a file from the 'clinical_logistic'' folder then hit the 'run' button. Is there a way for the program to catch the 'clinical_logistic' name in the pathname then run the 'clinical_logistic' protocol?

Another question, in directory name image, I have shipment_name = shipment2. I would like to use the shipment_name information in a pathname (directory_name 2 image). It will create a shipment subfolder if it's not there. I tried \@shipment_name\file_name. It created a @shipment_name subfolder.  How could I used the information correctly?

Is there a Pipeline Pilot guidebook that I could read to help me better understand the capability of each components?

Thank you for reading through my long response!User-added imageUser-added image
 
LynnLynn (Accelrys) 
The @shipment_name syntax is for specifying global variables in the context of a Pilotscript expression.  To use the value of the global as part of a string you should instead use the String Replacement Token syntax of $(shipment_name)   

I highly recommend the Pipeline Pilot Fundamentals training class where these types of concepts are covered.  There is a self-paced version available, and if enough people are interested your site might also want to contract for instructor-led training. 

If you will be attending our Science in the Age of Experience conference in Boston in a week there are several trainings available on Monday June 18 before the event -- see the event web page for details.
Leela214Leela214
Hi Lynn,

Thank you for the reply. It worked! I was able to create a subfolder calls 'shipment2' now. Also, thank you for pointing to the self-paced learning material. I definitely need it.  As for the conference, I don't think I will be able to attend any for this year....
I only know one person in my company who is skilled at Pipeline Pilot. He has been helping me too. But, I would like to put some effort into these questions that I have before I reach out to him. 

I am grateful for all the helps that I have received from everyone in this forum. The support from here help me tremendously for my work.