I would like to export ContentVersion with real content file. We want to migrate content from Salesforce to another system for a single library.

So, is there any way we can export data for a single library and get the physical file of content?

I am using "Data Export", but as there is no way to filter data in "Data Export", it is exporting all content of org. Which will take lot of time for exporting as well as downloading.

Please suggest, if there is any better way to export "Content" files and metadata by it's library name.

Thanks and Regards,

Ashish Shulka

6 Answers 6


you can try FileExporter app from appexchange.

  • Can you expand the answer a bit? How would it help them? Commented Feb 24, 2015 at 17:42
  • @kellyjandrews check out my answer about Realforce which supports file exports
    – metasync
    Commented Sep 24, 2017 at 6:00
  • @guest610 that app no longer there. what free apps do you know that works?
    – compski
    Commented Jul 29, 2022 at 8:12

We needed these content to be exported urgently. So, couldn't tried any AppExchange App.

Every salesforce content has it's download URL like : http://Your_ORG_URL/sfc/servlet.shepherd/version/download/?asPdf=false"

We logged into one browser and wrote a automation script to download these files by it's URL.

It was quite fast.

  • What script was it written in? Could you share the details so as it may help people here.
    – Viraj
    Commented May 18, 2016 at 19:16
  • 1
    @Mr.Orange, we used Selenium IDE Script. It is an firefox addon which takes input from xml with the help of SelBlock addon. SelBlock uses for loop and does the repetitive taks to download file. It is a open source addon which is generally used for automation testing.
    – Ashish
    Commented May 19, 2016 at 11:55

You can create the report for that data you want to export with all the filter criteria you need. And then export that data directly from reports.


We use the Salesforce Dataloader for manual queries where we want to select individual fields and then have a weekly download that backs up our entire database in it's current condition.

Backups are accessible from Setup > Administration Setup > Data Management > Data Export and there's some documentation here.

  • Or... for even more fine grain control you can experiment with an SOQL query via the Salesforce workbench and then issue an API request?
    – Huw
    Commented Feb 24, 2015 at 12:17
  • Are you able to export document files for content by using "Dataloader" 's export option? I am able to export all metadata of content version by using Dataloader. But my problem is with the documents (.docs, .pdf, etc) uploaded in these content versions.
    – Ashish
    Commented Feb 24, 2015 at 14:29
  • Humm i'm afraid I don't know there... I've never tried it. The closest I've seen is work that i've done using Ruby on Rails with the excellent restforce gem that page has docs on how you could tune it to download files... but perhaps that's slightly over-engineering the problem?
    – Huw
    Commented Feb 24, 2015 at 23:51

Disclaimer: I'm from the product team

Datasert Realforce has support for exporting files from Documents, ContentVersion, Attachments and pretty much any base64 fields.

  • It is query based export so you can specify the predicates to limit rows to your needs
  • For documents, it also supports exporting into the appropriate folders as maintained in Salesforce
  • It discovers the file name extensions, if file names doesn't end with appropriate one. For ex., if attachment content type if application/pdf but if file name doesn't end with .pdf then it adds .pdf extn.

I recently coded a Visualforce page to do this using some URL hacking.

Basically, you'll use the URL:


And append the ID's of all the ContentDocument.LatestPublishedVersionId's to the end of the URL separated by "/". So, it'd look something like:


I had to use %2F in my code instead of "/" in order for the mass download via button to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .