XML Pickup Help.

Post Reply
Paulyy
Newbie
Posts: 9
Joined: Tue Aug 29, 2023 8:05 am

XML Pickup Help.

Post by Paulyy »

Hi all, New here. Lurking for a bit but now can't find an answer.

Bear with me, i am new to Switch. I also am still demoing it so i dont have access to a lot of the help stuff which requires the subscription. I've just been looking at which modules, seeing which i need and dont need. (hence the demo)

I have an ok understanding of switch from all the beginner tutorials. made my own flows etc. have some basic automation in place.

Im trying to do an XML pickup. I've got a whole folder full of PDFs and XML folders.
Files are something like:
1234_5678.XML
1223_4556.XML
2234_7362.XML

1234_5678_job_name.PDF
1223_4556_another_job_name.PDF
2234_7362_some_other_job_name.pdf.

i have them in a folder. connected to XML pickup.
Ive selected Metadata alongside asset.
I am not sure what to put in the file name pattern,
I've tried stuff like *_*.xml; *_*.pdf and [job.name segment 1-9}_*
and anything i've tried, the jobs just sit in the folder.

I've had luck with using metadata in jobfolder asset, but this wont in this situation as every file has it's own XML.

Any help would be appreciated!
Last edited by Paulyy on Tue Aug 29, 2023 12:47 pm, edited 1 time in total.
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: XML Pickup Help.

Post by jan_suhr »

The XML-pickup is an important tool and necessary for doing real automation.

Metadata along asset means that Switch will pickup the content in the XML and attach it to the job file. For Switch to know which XML-file it should attach to the job file they must have the same name before the extension.

So your 1234_5678.xml must have a job file named 1234_5678.pdf.

There are ways to store the original name when you use the rename tool so that after the XML pickup you can get the real name back.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Paulyy
Newbie
Posts: 9
Joined: Tue Aug 29, 2023 8:05 am

Re: XML Pickup Help.

Post by Paulyy »

jan_suhr wrote: Tue Aug 29, 2023 10:24 am The XML-pickup is an important tool and necessary for doing real automation.

Metadata along asset means that Switch will pickup the content in the XML and attach it to the job file. For Switch to know which XML-file it should attach to the job file they must have the same name before the extension.

So your 1234_5678.xml must have a job file named 1234_5678.pdf.

There are ways to store the original name when you use the rename tool so that after the XML pickup you can get the real name back.
Thankyou,

I was to stuck on preserving the file name at the start for really no reason. I changed the file names manually to be identical to the PDFs and it worked.
The file name already preserved in the XML but it's not important.

How would i use the rename job node to work where i want to keep the 1234_5678 or 3456_789 in front of the file name if it is 1234_5678_a_file_name.PDF and 3456_789_random_file_name.PDF?
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: XML Pickup Help.

Post by jan_suhr »

If you just want to keep a part of the file name you can save that as Private data. When a job passes a folder you can add Private data to it. Some apps can also save Private data to a job.
Then when you make the Private data for this case you can set it up to just take the part you need.

Now you have this stored and can later Rename the job with the Private data.

the manual cover this in detail
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Paulyy
Newbie
Posts: 9
Joined: Tue Aug 29, 2023 8:05 am

Re: XML Pickup Help.

Post by Paulyy »

jan_suhr wrote: Tue Aug 29, 2023 1:43 pm If you just want to keep a part of the file name you can save that as Private data. When a job passes a folder you can add Private data to it. Some apps can also save Private data to a job.
Then when you make the Private data for this case you can set it up to just take the part you need.

Now you have this stored and can later Rename the job with the Private data.

the manual cover this in detail
This is before the XML pickup. The XML has all the original file name. Im just stuck on how to use the rename job tool, so i can make it the same as the XML file.
i know how to rename the file using the xml data, just not remove parts of the file name.
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: XML Pickup Help.

Post by jan_suhr »

In the rename tool you can use "Keep segment" as one of the Actions.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Paulyy
Newbie
Posts: 9
Joined: Tue Aug 29, 2023 8:05 am

Re: XML Pickup Help.

Post by Paulyy »

jan_suhr wrote: Tue Aug 29, 2023 2:20 pm In the rename tool you can use "Keep segment" as one of the Actions.
I had to find an alternative solution, but it's solved.
as some of the names have 9 segments and some have 8 segments.

but now i have a great flow that gets XML into the PDFs.

I appreciate the help!
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: XML Pickup Help.

Post by jan_suhr »

I thought that they were the same all the time. You always have the search option that uses RegEx
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Post Reply