Loading

Rename downloaded documents on a Mac

Дата публикации: Oct 13, 2022
Описание
 
When users perform data exports and downloads the zip file, the Documents folder within the export are not the actual files. They are also named as their unique Salesforce IDs. This article will detail how to proceed with renaming your downloaded documents on Mac device.

Note: The Article Rename exported attachments or document files only covers steps for Windows.
 
Решение


To rename exported documents on a Mac


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

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

3. Copy the formula on the following line and paste it into cell C2.
 

="mv "&A2&" """&B2&""""
 

4. The resulting cell should look like this:
 

** 015 for Documents
mv 015300000046RlaEAE "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. Paste on TextEdit on Mac.

8. Save it as plaint text by pressing "Command + Shift + T"

9. Save the file in your exported Documents Folder as "rename.sh" (without the quotation marks). This is where the records to be renamed are located.

10. Open terminal.
 

** Click on the magnifying glass on your Mac or Spotlight Search for Terminal
 

11. Type "cd" (without the quotes) followed by a space and then drag the attachments folder that contains the "rename.sh" file into the terminal, and add "pwd" then press enter.
 

** it should look like this : Dans-MacBook-Pro:~ dancarlo$ cd /Users/dancarlo/Downloads/DataExport/Documents pwd
 

12. Type sudo chmod 777 "rename.sh" -- no quotes, insert your filename there (case sensitive). It should prompt you for your password - this gives the system permission to run the file.
 

** The characters typed for your password will not appear, so just go ahead and type it then press enter
** it should look like this
*** Dans-MacBook-Pro:Documents dancarlo$ sudo chmod 777 rename.sh

Password:


13. Type sudo ./"rename.sh ", no quotations, just your filename, and then press enter
 

** it should look like this : Dans-MacBook-Pro:Documents dancarlo$ sudo ./rename.sh
 

14. You should see it run and then you should see all the names update in the folder.

15. Close "Documents.csv" in Excel without saving any changes.

 

Salesforce Support video:
How to Rename Exported Attachments or Document Files on a Mac
Номер статьи базы знаний

000381782

 
Загрузка
Salesforce Help | Article