3 years ago, I had shared a tool to generate direct download link for a Google Drive file. But what if you need to create direct links for all your files at a time. There's a Sheets Add-on which let's you do it.
How it works
Upon installation, it requires permission to access your Google drive files. Once provided it analyses your files one by one and fills the spreadsheet with details of your files which includes folder name, path of the folder on Google Drive, file name, direct link in with whom you've shared the file. Each row on spreadsheet represents a file on your Drive.
How to install
You can install the Add-on using this link - Direct Download links for Google Drive. Click on Free, a spreadsheet will be opened and it will ask for your permission. Click Continue and choose your Google account to authorize the app.
Now you're all set to use the Add-on, on your sheet select Add-ons → Direct Drive Links → Generate Links. Within seconds your sheet will be filled with the details of all your files on Google Drive.
Note: The sheet will generate
Settings and Configuration
For now, there are two configurations for you to use according to your needs,
1. Auto refresh
By default, whenever you open the sheet, it'll refresh the links automatically for you. But if you open the sheet more than once between 6-hour interval, automatic refresh won't happen. If you want to get the links to newly added files in the meantime, you can use
Refresh Links option that's available under Add-ons → Direct Drive Links.
You can also disable the auto refresh option altogether, select Add-ons → Direct Drive Links → ✓ Autorefresh on open.
2. Getting links for Shared with me files
By default, files shared with you won't be considered. If you want to include
Shared with me files select Add-ons → Direct Drive Links → Include Shared with me Files. Of course, you can turn it off by doing the same again.
3. Repeat folder names
There is an option for you to repeat the folder path & names in column 2 & 3. When you sort by filename, to know within which folder every file is you can use this. It is by default disabled, to enable it just select Add-ons → Direct Drive Links → Repeat folder names. You can toggle if you want to disable later.
Open folders on Google Drive
Hover over the folder name in the first column and click on the link to view the folder contents on Google Drive.
Update Share details
If any of the files are not shared with anyone or you want to share that with more people, You can do that using your sheet, All you have to do is, hover over the file name for which you want to update share details click on the link, you'll be redirected to the file preview page.
On the top right corner of the page, left to your profile picture, click on the menu and then Share. Now you can share that file with anyone you want.
Issues and Feature requests
If you run into any issues or you want any feature to be added to this add-on, do leave a comment on this post. I'll see what best I can do.
The Google sheets Add-on 'Drive Direct Links' is free to use and it doesn't collect or use or share any user info in any form. However, authorization is required just to get access to your Google Drive.