I would like to extract the attachments from a existing InfoPath form to a SharePoint library or to my local desktop.
Is this possible?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
After Extensive search found dead easy way to extract the attachments from infopath forms.
The only way I've found to extract attachments from InfoPath forms is to open them from within SharePoint and then open/save the attachment.
This depends if your InfoPath form is stored in SharePoint as an "InfoPath Form Library" or as a SharePoint List item.
InfoPath Form Libraries store attachments inside a node the form's XML document as text: the attached binary file is base64 encoded by the InfoPath Form Service on the SharePoint Server after submit. The only way to easily get to these attachments is top open up each form in the browser or in InfoPath form filler application and then download the attachment.
If the Form is just a front-end for a SharePoint list, which is the more common approach, the files can be accessed via SharePoint Designer as indicated in AIM4DREAM answer. There are techniques to copy the attachment via a SharePoint Designer Workflow into a Document Library using third-party tools.
If your attachments are in a form library, the XML documents can be copied to disk via Windows Explorer and then parsed with a PowerShell script (or any other XML processing tool) to extract each attached document, and then de-encoded from Base64 back to binary.