+ Start a Discussion
SalesRedSalesRed 

Retrieving all Folder files for Documents. EmailTemplates etc via Metadata Star "*"

Hi,  I've pulled metadata from a sandbox and noted that when I specify the following for example for documents

<types>
             <members>*</members>
             <name>Document</name>
</types>

Not all documents and folders are retrieved.  Is there a way to specify All documents and their folders should be pulled in the metadata without requiring for example to specify each folder name as follows?

<types> <members>MyDocumentFolder/MyDocumentName</members> <name>Document</name> </types>

Does "*" not work in this case/ Similarly for EmailTemplates, Letterheads and others....

Thanks in advance for any help/suggestions

 
Best Answer chosen by SalesRed
pconpcon
As you stated, this is because they are folder based and you have to specify the individual members like you have there.  It's unfortunate, but those do not support the wildcard matching.  The best way to do this is to first fetch the data from Salesforce and then build the package.xml from the listing.  You can see in the solenopsis [1] source code where it does some of the folder based processing.

[1] https://github.com/solenopsis/Solenopsis/blob/38d5866c29d9449b0bad75dd6c5fa2a4c5048ed5/ant/1.1/util/sfdc-util.xml