Create a Google Sheet named fileIdFromFileName
. Populate the sheet with the following columns: Column A: ID (optional, can be left blank or used for unique identifiers), Column B: Filename (list the filenames of the files you want to retrieve IDs for), Column C: File ID (this column will be populated by the script).
Add the Script by opening your Google Sheet, going to Extensions > Apps Script
, deleting any code in the script editor, and replacing it with the script provided below.
Run the Script by clicking on the play button (▶️) in the Apps Script editor. The script will search for the files in your Google Drive and populate Column C with the corresponding file IDs. If a file is not found, the script will set the cell to "File Not Found."