Using Query

  1. Login to your Salesforce account.
  2. Open Developer Console.
  3. Run the following query in the Developer Console to get all files with Ids:

    SELECT Id, Title
    FROM ContentDocument
    CODE


    --OR--
    Run the following query to get the ParentFolderId:

    SELECT Id, Name
    FROM ContentFolder
    CODE

Using Salesforce UI:

  1. Login to your Salesforce account.
  2. Navigate to Salesforce Files.
  3. Click the dropdown icon () to the right of the file for which you want to get the FileId.
  4. Select View File Details.
  5. Copy the FileId from the URL (for example, highlighted in Red).