I am working on migrating files from an old SF org to a new one. I have done a data export on the required files and documents using the native Data Export tool in the Setup.

That gave me the following files/zip folders.

Downloaded Files/Zip folders from export

There are an additional 48 zipped folders that I condensed into a single folder on my desktop called ContenVersionAll. This folder contains the IDs of all of the files that I exported.

ContentVersionAll Folder

I worked on renaming the files in the ContentVersionAll folder to help it relate to the ContentVersion.csv that I am creating for the upload. Now, the files look like this:

Renamed Files

The next step is to recreate the ContentVersion csv with the following criteria (I am including my example next to each column needed:

Title - targetx_green_x

PathOnClient - C:\Users\wklein\OneDrive - California Baptist University\Desktop\ContentVersionAll

VersionData - C:\Users\wklein\OneDrive - California Baptist University\Desktop\ContentVersionAll\targetx_green_x.png

Now that I have my file prepared, I open DataLoader and start a new import job. Map the fields to their correct positions and begin upload. However, this is where it fails. I get the following error message:

SOURCE: 'VersionData' DESTINATION: 'VersionData' ERROR:Version Data: value not of required type: C:\Users\wklein\OneDrive - California Baptist University\Desktop\ContentVersionAll\targetx_green_x.PNG

Has anyone be able to load data into this object using this method?

I am following the guide these 2 locations:

https://www.stimulusconsulting.co.uk/news/salesforce-data-migration/ https://help.salesforce.com/s/articleView?id=sf.loader_content.htm&type=5&language=en_US

Thank you for the help.

  • 2
    you may have to wrap the path in quotation marks since there are spaces in the path. You may want to look at the raw CSV and check for quotation marks Dec 5, 2022 at 20:37
  • Thank you @BryanAnderson, I tried that but it is still giving me the same error. If you think of anything else, let me know. I appreciate your quick response! Dec 5, 2022 at 22:06

1 Answer 1


I know this is old, but the VersionData field expects the base64-encoded contect of the file. What you need to do is read the file contents (bytes) and convert that it's base64-encoding for each of the files. Hope this helps someone in the future.

You must log in to answer this question.

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