Google Drive – Hide Google Drive Folder but Still Access with Link

google-drive

Is it possible to setup a folder on Google Drive so that users can access the files within it if they have a direct link but they cannot see the folder if they browse to its parent?


Here's what I have:

Example

The Files folder has a bunch of Google Sheets files that I don't want users to rename or move. I realize that they can do this from the File menu when they open the spreadsheet but my average user is not familiar with that functionality. (They are very used to Windows network drives, though.)

The Log of Files spreadsheet contains basic information about all those files as well as a direct link to each.

Scripts in the spreadsheet create the files in the Files folder (using the current user's authorization) and store their direct links in the log. The files are named as their record identifier. For example, the log might have record ABC170001 and the file for that record would be named ABC170001. Users have a tendency to want to rename it to something they can recognize when browsing the folder such as Widget 1234 move to new supplier. This behavior can mess up the scripts in the log spreadsheet.


Here's what I want:

Example

The folder is still there and the direct links in the spreadsheet still work but people can't browse to the Files folder and see all the files. This would naturally encourage them from browsing to find their files and, instead, they would use the log to open what they want. This negates the most common reason the files get renamed.


Here's what I've considered:

  • Messing with access rights.
    • Problem: I haven't found a setting that hides the folder without also removing their ability to edit the files after opening them with the direct link.
  • Marking the folder as hidden.
    • Problem: I haven't find a property to do that.
  • Setting the property rights such that users can see the folder but can't open it and then setting the access rights for each file (when it is created by the script) such that anyone in the company can open/edit with a direct link.
    • Problem: I haven't trying changing access rights in Google Script yet and didn't want to spend the time with trial & error unless I thought it was likely to succeed.
  • Moving either the log or the folder somewhere else, thus obfuscating it from the user but not actually hiding it.
    • Problem: I'd like to avoid this option until I'm sure a more direct approach isn't available.
  • Share the folder with specific people instead of everyone with a link and then creating an installable trigger (or some other means) that runs under my authorization to create the files and set each authorization to "Domain with Link".
    • Problem: I haven't worked out how to let the user trigger it on demand and have it run under my access because the installable triggers seem very limited. I'm still trying to figure out how that could work.

Best Answer

The solution to this seems to be quite simple. Go to your log of files document and set up each of your records e.g

ABC170001

As a hyperlink

Hyperlink to another file

Set the hyperlink to link to the appropriate file they need to edit. The Hyperlink should be generated with "Anyone with this link can edit the document"

Then when giving out the link for the log of files document set it as Anyone can view.

View Document

Don't give anyone permissions to view the folder just the files, meaning they can't edit your log of files file but the links should take them to an editable document.

Your current mistake seems to be that you are sharing the entire folder containing both the "Log of Files" and the "Files" folder

I demonstrate below what not to do:

DO NOT SHARE WHOLE FOLDER!!