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?
Output folder name
- baldifabrizio
- Newbie
- Posts: 11
- Joined: Sat Jan 16, 2021 2:30 pm
- Location: Roma - Italia
Re: Output folder name
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 (31.33 KiB) Viewed 5670 times
-
- 02 Schermata 2021-01-19 alle 21.04.05.png (47.53 KiB) Viewed 5670 times
-
- 01 Schermata 2021-01-19 alle 21.08.22.png (14.4 KiB) Viewed 5670 times
Fabrizio Baldi
- baldifabrizio
- Newbie
- Posts: 11
- Joined: Sat Jan 16, 2021 2:30 pm
- Location: Roma - Italia
Re: Output folder name
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
-
- Newbie
- Posts: 6
- Joined: Mon Apr 20, 2020 8:21 pm
Re: Output folder name
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) Path Segment 2 - I thought this would create the next sub folder based on the element name 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??
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) Path Segment 2 - I thought this would create the next sub folder based on the element name 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??
Re: Output folder name
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".
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".
Re: Output folder name
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:
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)