Page 1 of 1

How to get file from root folder

Posted: Tue Jul 11, 2023 10:38 am
by Krzysztof Mycek
Hi
I need to download a file in a specific way:

For Example I have a root folder with folder:
Root/
123456_costam/test.pdf
098766_terefere/test2.pdf
567843_test/test3.pdf
345678_test2/test4.pdf

inside the folders are files
Question is:
How can I download files by looking at the first 5 numbers in root folder?
I need to find file for example test.pdf from folder 123456_costam but in variables I have only 123456 in XML (that is the number of orders.
I will try to get path //root/123456/test.pdf and find this number by regexp (first 6 digits) but variables is always not correct.

Re: How to get file from root folder

Posted: Tue Jul 11, 2023 10:44 am
by laurentd
There's an app for that, Inject Wildcard

Re: How to get file from root folder

Posted: Tue Jul 11, 2023 11:06 am
by Krzysztof Mycek
Hi Laurentd
I use them but not working correct:

I use the line in root joob repository:

//nordsign.local/dfs/Orders/Print Republic/[Metadata.Text:Dataset="Xml",Model="XML",Path="/Positions/position/ORDER_NUMBER"]/

result is: //nordsign.local/dfs/Orders/Print Republic/12345/

Here is the first segment incoming from XML: 12345

But how I can change them by 12345_costam?
I need result: //nordsign.local/dfs/Orders/Print Republic/12345_costam/and here is the name of file from next line of XML

Re: How to get file from root folder

Posted: Tue Jul 11, 2023 1:52 pm
by tdeschampsBluewest
Hi, as Laurent said, inject Wildcard have every tool you need for this purpose (and several option to achieve it)

Maybe you could try something like this :

job repository : //nordsign.local/dfs/Orders/Print Republic/
Inject : File only
Injected jobs name filter : *.pdf (or something from your xml)
Hierarchy parents name filter : [Metadata.Text:Dataset="Xml",Model="XML",Path="/Positions/position/ORDER_NUMBER"]_*

Re: How to get file from root folder

Posted: Tue Jul 11, 2023 4:50 pm
by Krzysztof Mycek
My solution is in Scan hierarchy and Inject Wildcard
But thank You for your help