Print this page

How can I rename and convert exported Chatter Files and Chatter Feed Attachments?

Knowledge Article Number 000206552
Description When data are exported from Salesforce, Chatter Files and Chatter Feed Attachments are exported in MIME format so it needs to be converted back to normal format. Also, files are provided as IDs and not names which also require conversion. Salesforce ID for Chatter files has an 18-character code that begins with 0689.
Resolution The following steps can be taken on a Windows based machine where the user should have Admin privileges to rename the records.

1. Open the file "ContentVersion.csv" in Excel.

2. Delete all columns except "ID" and "PathOnClient". Once all the other columns are deleted, "ID" should be in column A and "PathOnClient" should be in column B.

3. Copy the formula on the following line and paste it into cell C2: ="RENAME "&A2&" """&B2&""""

4. The resulting cell should look like this: RENAME 00P300000046RlaEAE "Technical Specifications V1_2.docx"

5. Double-click the lower right corner of cell C2 to copy all the way down to column C.

6. Select column C and copy it. 

7. Open Notepad. 

8. Paste the copied cells into Notepad. 

9. Click File then Save in Notepad, and save the file in your exported ContentVersion Folder as "Fix.bat" (without the quotation marks). This is where the records to be renamed are located.

NOTE: Large exports are broken up into multiple .zip files (each .zip file created will hold up to approximately 512 MB). 
Copy the "Fix.bat" file in the ContentVersion folder in each of the .zip files.

10. Navigate to your exported ContentVersion directory and double-click "Fix.bat". It should rename all the Files appropriately.

11. If there are files that are not converted, it means that the files have the same file name inside the folder. To convert the remaining unconverted files, create a new folder and copy the unconverted files and the fix.bat file to that new folder. Double click the fix.bat file again. Repeat the process on all ContentVersion folders until all files are converted.

12. Close "ContentVersion.csv" in Excel without saving any changes.

promote demote