How to set expiration date for shared Google Drive files

When you create a share link for a file stored on Google Drive to share it with anyone, the link you generate is like immortal, forever to exist.

The link will not expire or get deactivated on its own. So in case you intend to stop the person from accessing the file you shared, the only possible way out is to manually change the sharing permissions for that particular file. However, it may at times become dicey say, for example, you share a file on Google Drive with a third-party vendor for some contract. In such case, the vendor will continue having access to the file, even way after the contract has ended and, this way, your task may easily get precarious.

For such cases, how about having a way out to set an expiration date to a link you share on Google Drive? And the link will tend to expire or become inaccessible once the stipulated date is reached. For example, say you set an expiration date of one week before sharing a file on Google Drive, the file will become inaccessible after the set time frame. Isn’t it awesome?

Add an auto-expiration date to links shared on Google Drive

Though Google Drive actually provides the feature to set auto expiration of links on shared files, the feature is only available for on paid versions of Google Drive that is Google for Work account. However, you need not panic. All you need is a Google account and you too can create temporary links that will expire after a certain period of time, as specified by you while sharing the link.

Here’s a step by step guide to creating temporary links on Google Drive

1. Get a script dubbed Set Expiration Date for Google Drive links which is readily available on the web.

Set Expiration Dates for Google Drive Links

2. Now using File Picker, select any file or folder on Google Drive that you wish to share with someone.

Set Expiration Dates for Google Drive Links

3. Enter the email addresses of people (separated by a comma) whom you wish to give access to the link. Access can be of two types, i.e.

Set Expiration Dates for Google Drive Links

Read Only or Read and Write, wherein the person can freely make changes to your files or folders shared on the Drive.

Now assign the file a time window after which the shared link should expire and become inaccessible. The time period can be just about anything, ranging from three days, to a week, or maybe four long years, depending upon your preference.

Hit Set Expiration button to complete the process.

And that is it! The user will be automatically removed from the sharing list after the stipulated time or date, thanks to the lovely light script that will work silently in the background to do the task for you as and when required.

You can also make use of the Google Drive Auditor to analyze the permission status of shared files on your Google Drive account to check who all have what sort of share permissions assigned for the particular link.

The auto expiry application shows a list of all files and folders that are due to expire in certain period of time.

If you wish to stop a link from being auto expired, you can click on Cancel option provided against all the links you’ve shared. Have fun!