Output folder name

Post Reply
Whirlpool_Prepress
Newbie
Posts: 6
Joined: Mon Apr 20, 2020 8:21 pm

Output folder name

Post by Whirlpool_Prepress »

I know this is very basic but I for whatever reason can not seem to get my head around the hierarchy setting process.

What I am trying to accomplish is the following:

Input folder containing PDFs > flow creates GIF/PNG/JPG > Archive to a folder that is named the original input folder name with sub folders for each file type. Can anyone help a noob out with this?
User avatar
baldifabrizio
Newbie
Posts: 11
Joined: Sat Jan 16, 2021 2:30 pm
Location: Roma - Italia

Re: Output folder name

Post by baldifabrizio »

I'm not an expert, but I built a flow with similar needs to yours. I am attaching some screenshots. the element to use is "Set hierachy path". As you will see, it allows you to extract the various parts of the file path, to recombine them as you need. When you select the element in properties you set Action (there are various, i set "Replace") and set the value of path segment with "Single line text with variables defined".
Attachments
03 Schermata 2021-01-19 alle 21.04.23.png
03 Schermata 2021-01-19 alle 21.04.23.png (31.33 KiB) Viewed 5627 times
02 Schermata 2021-01-19 alle 21.04.05.png
02 Schermata 2021-01-19 alle 21.04.05.png (47.53 KiB) Viewed 5627 times
01 Schermata 2021-01-19 alle 21.08.22.png
01 Schermata 2021-01-19 alle 21.08.22.png (14.4 KiB) Viewed 5627 times
Fabrizio Baldi
User avatar
baldifabrizio
Newbie
Posts: 11
Joined: Sat Jan 16, 2021 2:30 pm
Location: Roma - Italia

Re: Output folder name

Post by baldifabrizio »

I'm not an expert, but I built a flow with similar needs to yours. I am attaching some screenshots. the element to use is "Set hierachy path". As you will see, it allows you to extract the various parts of the file path, to recombine them as you need. When you select the element in properties you set Action (there are various, i set "Replace") and set the value of path segment with "Single line text with variables defined".
Fabrizio Baldi
Whirlpool_Prepress
Newbie
Posts: 6
Joined: Mon Apr 20, 2020 8:21 pm

Re: Output folder name

Post by Whirlpool_Prepress »

Thank you so much for jumping in and trying to help me out!!

So I thought I was on the right track and had tried what you said, but this is where I am running into a wall.

I setup a Set Hierarchy Path element with the following path segments

Path Segment 1 - This is creating the folder name as I expected it to (D200303XM- the name of the input folder)
Screen Shot 2021-01-19 at 3.25.30 PM.png
Screen Shot 2021-01-19 at 3.25.30 PM.png (100.55 KiB) Viewed 5625 times
Path Segment 2 - I thought this would create the next sub folder based on the element name
Screen Shot 2021-01-19 at 3.25.59 PM.png
Screen Shot 2021-01-19 at 3.25.59 PM.png (77.98 KiB) Viewed 5625 times
What is happening is it is creating the folder "D200303XM" and then just placing the gif images in that loose rather than creating the subfolder "GIF" first... what am I missing??
patej
Member
Posts: 79
Joined: Sun Nov 25, 2012 12:15 pm

Re: Output folder name

Post by patej »

Hi,
For the Path Segment 2 you need [Job.Extension] (or [Job.Extension:Case="upper"] if you want to ensure uppercase names GIF/PNG/JPG).
[Switch.ElementName] gives you the name of the current flow element, e.g. "Set Hierarchy Path" or "Folder 123".
freddyp
Advanced member
Posts: 1009
Joined: Thu Feb 09, 2012 3:53 pm

Re: Output folder name

Post by freddyp »

The way to approach hierarchies is by starting at the end: when a job hits "Archive hierarchy" this element creates a folder and subfolder structure based on what is in the [Job.Hierarchy] variable. The same is true by the way for "FTP send".

It is your job as a flow designer to make sure this variable contains the correct value(s) by the time the job arrives at such an element that uses it. There are four ways in which you can manipulate the Hierarchy variable:
  • There are input elements that allow you to add something to the hierarchy: Submit hierarchy, FTP receive, Mail receive and a few others. They also allow you to already select a portion of what could become the hierarchy: that is done by choosing the levels. If you only want the top folder of the input hierarchy you specify that you only want 1 level. You want them all? Specify 99 (or 42 of course)
  • On every intermediate folder there is an "Attach hierarchy info" property. This adds the name of the folder to the hierarchy. This is useful if you want the hierarchy to be different depending on the path the job followed (OK, Error, ...).
  • You can add values to the hierarchy with the "Set hierarchy path" element. This one also allows a number of other manipulations on the hierarchy. This element is useful for adding things to the hierarchy that are not derived from folders, e.g. today's date, something from metadata, ...
  • Through a script (legacy only for the moment)
Of course, the order of the components of the hierarchy is important because that decides the order of creation of the folders. That is why you have the "Add at the top - Yes/No" on folders and why "Set hierarchy path" allows you to massage the values in the variable.
Post Reply