"Export all files from Salesforce" sounds like one task. It is actually six — because Salesforce spreads file and note content across six separate objects, each with its own storage model, its own linking mechanism, and its own way of being missed. This guide covers all of them, and shows you how to prove your export is complete rather than hoping it is.
Every Place Salesforce Stores a File
Before exporting anything, it is worth knowing exactly what you are trying to export. An org that has been through a Classic-to-Lightning transition almost always has content in every row of this table:
| Object | What it holds | How it links to a record |
|---|---|---|
ContentDocument / ContentVersion |
Salesforce Files — the modern Lightning file model. The binary lives in ContentVersion.VersionData. |
ContentDocumentLink (many-to-many) |
Attachment |
Classic attachments. Still present in most orgs even after the Lightning migration. | ParentId (one-to-one) |
Document |
Items in the Documents tab, stored in folders. Frequently forgotten entirely. | FolderId |
Note |
Classic Notes — plain text, no formatting. | ParentId |
ContentNote |
Enhanced Notes (Lightning Notes) — rich text HTML. | ContentDocumentLink |
StaticResource |
Developer assets — zips, images, scripts referenced by Visualforce and Lightning components. | Metadata, not record-linked |
There are two further edges worth checking in older orgs: attachments on EmailMessage records, and files posted to Chatter feeds, which in Lightning are ContentDocument-backed and therefore covered by a Files export — but in Classic may exist as FeedAttachment rows.
Why "Export All Files from Salesforce" Rarely Means All
Each native route stops short in a different place, which is why teams so often end up with a partial export they only discover months later:
- Data Export Service — will include files and attachments if you tick the right boxes, but runs weekly at best on Enterprise, Unlimited and Performance editions and monthly on Professional and Developer. Binaries arrive in ZIP archives that must be matched back to parent records by hand using the manifest CSV.
- Data Loader — exports the records, not the binaries. The
VersionDataandBodyfields come out as API URLs, not file content. - Downloading from the UI — accurate but linear. At roughly ten seconds per file, 20,000 files is more than fifty hours of clicking.
- Custom scripts — workable, but you own the pagination, the retry logic, the API limits, the filename collisions, and the maintenance.
We covered the trade-offs of each approach in detail in How to Bulk Download Files from Salesforce and compared the tooling head to head in Best Salesforce Data Export Tools.
How to Export All Files and Attachments from Salesforce
Files and Attachments are the two largest buckets in almost every org, and they need to be handled together — one export pass covering both, so that nothing depends on remembering to run a second job.
SFDC File Exporter is a desktop application that connects over the Salesforce API. Nothing is installed in your org, no package deployment is required, and the binaries are written straight to your own disk.
- Install and connect — download the app for Windows, Mac or Linux and log in with OAuth or a security token.
- Choose the export scope — an entire object, a list view, a CSV of record IDs, or a single record.
- Include both file models — enable ContentDocument files and classic Attachments in the same job.
- Set the folder structure — group output by object and record so every file stays attached to its context.
- Run the export — the tool resolves each
ContentDocumentLinkandAttachment.ParentId, downloads the binaries in parallel, and handles duplicate filenames automatically.
For a full walkthrough of the object-based route, see exporting files by object.
How to Mass Export All Files from Salesforce
Mass export is the same operation at a scale where the details start to matter. Three things change once you are past roughly 50,000 files:
- Split the run by date range or object. Several medium jobs are far easier to verify — and to resume — than one job spanning the entire org.
- Watch the file path length on Windows. Deeply nested record folders plus long Salesforce filenames can exceed the 260-character path limit; shorten the output root before you start rather than after a failure.
- Schedule the heavy passes outside business hours. A large export consumes API calls that your integrations also need. SFDC File Exporter can run exports on a schedule and keeps a job history so you can confirm each pass completed.
How to Export All Notes from Salesforce
Classic Notes live on the Note object. They are plain text, they carry no formatting, and they link directly to a parent record through ParentId. Because the object is separate from the Files model, no file export touches them — a Files-only export of an org with 30,000 Classic Notes exports precisely zero of them.
SFDC File Exporter reads the Note object directly and can write each note either as an individual text or PDF file per record, or flatten every note into a single CSV. The step-by-step version is in Download Salesforce Notes in Bulk.
How to Export All Enhanced Notes from Salesforce
Enhanced Notes — Lightning Notes — are ContentNote records. They store rich text as HTML, they sit under the ContentDocument umbrella, and they link through ContentDocumentLink rather than ParentId.
This creates the single most misleading count in a Salesforce export. Because every Enhanced Note also creates a ContentDocument row with a FileType of SNOTE, an unfiltered ContentDocument export pulls your notes down alongside your real files — as .snote files that most people cannot open. The note content is there, but it is not in a usable format, and the file count no longer means what you think it means.
.snote extension, you have exported Enhanced Notes as raw files. They need to be extracted as notes — as text, PDF, or CSV rows — not left as SNOTE binaries.Handled properly, Enhanced Notes should come out as readable content with their parent record attached. SFDC File Exporter exports Classic Notes and Enhanced Notes together, converting the HTML body to clean text or PDF and keeping the parent link intact. If your destination needs a flat structure instead, export both note types into a single CSV with parent object fields on every row.
How to Prove the Export Is Complete
This is the step almost every guide skips, and the one that matters most. Run these counts in the Developer Console or Workbench before you export, write the numbers down, and reconcile against what actually landed on disk:
-- Real files only, excluding Enhanced Notes
SELECT COUNT() FROM ContentDocument WHERE FileType != 'SNOTE'
-- Enhanced Notes, counted separately
SELECT COUNT() FROM ContentDocument WHERE FileType = 'SNOTE'
-- Classic attachments
SELECT COUNT() FROM Attachment
-- Documents tab
SELECT COUNT() FROM Document
-- Classic Notes
SELECT COUNT() FROM Note
-- Static resources
SELECT COUNT() FROM StaticResource
-- All file versions, if you need version history too
SELECT COUNT() FROM ContentVersion WHERE IsLatest = true
Three things routinely explain a mismatch, and none of them mean the export failed:
- Versions.
ContentVersionwill exceedContentDocumentin any org where files have been re-uploaded. Decide up front whether you need only the latest version or the full history. - Shared files. One ContentDocument can be linked to many records through
ContentDocumentLink. Exporting per record legitimately produces more files on disk than there are ContentDocument rows. - Notes counted as files. The
SNOTEsplit above is the usual culprit when the numbers are close but not equal.
What Each Method Covers
| Content type | Data Export Service | Data Loader | SFDC File Exporter |
|---|---|---|---|
| Files (ContentDocument) | ZIP archive, manual matching | Metadata only | Yes, organised by record |
| Attachments | ZIP archive, manual matching | Metadata only | Yes, organised by record |
| Documents | Partial | Metadata only | Yes |
| Classic Notes | CSV rows only | CSV rows only | Text, PDF or CSV |
| Enhanced Notes | Raw SNOTE | Metadata only | Readable text, PDF or CSV |
| Static Resources | No | No | Yes |
| Runs on demand | Weekly or monthly | Yes | Yes, plus scheduled |
When Teams Need a Complete Export
- Org sunset and decommissioning — once the org is switched off, anything not exported is gone. See exporting files before an org sunset.
- Org consolidation — merging two orgs means moving both file models intact, covered in Salesforce instance consolidation.
- Compliance and legal hold — a regulator asking for "all documents relating to this account" means all six objects, not just Files.
- Storage cost reduction — export, verify, then delete. The verification step is what makes the deletion safe.
- System migrations — moving to another CRM or an HR system migration, where notes carry as much history as the files do.
Frequently Asked Questions
Does the Salesforce weekly data export include all files and attachments?
Only if you tick "Include Salesforce Files" and "Include Attachments". Even then it runs weekly at best on Enterprise, Unlimited and Performance editions, monthly on Professional and Developer, and delivers binaries in ZIP archives that must be matched back to parent records by hand.
Why does my file count not match what I exported?
Usually because Enhanced Notes are counted as ContentDocument records with a SNOTE file type. Multiple versions per file and files shared across several records are the other two common explanations.
Are Classic Notes and Enhanced Notes stored in the same place?
No. Classic Notes are plain text on the Note object linked by ParentId. Enhanced Notes are ContentNote records holding rich text HTML, linked through ContentDocumentLink. Exporting one does not export the other.
Can I export all files without installing an AppExchange package?
Yes. SFDC File Exporter is a desktop application connecting over the Salesforce API, so nothing is deployed to your org and no admin package approval is needed. Files are written directly to your machine — see the security architecture for how the connection is handled.
How do I export all files for one object only?
Select the parent object and the tool resolves every ContentDocumentLink and Attachment ParentId for records on it. Narrow it further with a list view, a CSV of record IDs, or a SOQL WHERE clause.
Export Everything, Then Verify It
A complete Salesforce export is not one job — it is files, attachments, documents, Classic Notes, Enhanced Notes and static resources, followed by a reconciliation that proves each bucket arrived. SFDC File Exporter covers all six in a single tool, keeps every byte on your own machine, and records a job history you can audit afterwards. Download it free and run your first reconciled export today.