<link rel="stylesheet" id="gtranslate-style-css" href="https://websetnet.b-cdn.net/wp-content/plugins/gtranslate/gtranslate-style24.css" type="text/css" media="all">

Set an Auto Expiration Date for your Google Drive files & folders


In our earlier post, we covered the method how to transfer ownership of a file/folder in Google Drive. Today, we share a useful tip that allows a user to block access to a shared folder after a defined period of time. You can follow the steps outlined in the post to set up an expiration date for Google Drive links. Just make a copy of the script, add the URL of your Drive folder, and set the expiration date.

With this, you can restrict permission to individuals who have access to your files for viewing and editing. The only shortfall, the process is not automated so, you have to remove them individually since Google Drive doesn’t allow you create auto-expiring links. However, you can revoke the decision anytime.

Set an Expiration Date for Google Drive files

To set an expiration date for files you share from Google Drive, you need a script called Set Expiration Dates for Google Drive Links.

Set an Expiration Date for Google Drive files

Visit Set Expiration Dates for Google Drive Links and grant it permission to access the files in your Google Drive.



Next, click the Open Drive button and select a file or a folder you would like to share with someone.


Enter email addresses of the person to grant him access for viewing and editing access. When the link expires, both types of access will automatically be removed.

Next, set the expiration time. The script by default does not offer a choice. You have to select options from available options. The timeline ranges from few hours to days. The shortest duration of time you can use to set an expiration is in hours. Select a suitable duration and hit the ‘Set Expiration’ button. Your file will be shared immediately.


The file will be instantly sent to the recipient via email. Any notification about the timeline available for the recipient to edit or view a file will not be visible. You should inform about the same via some other mode of communication.

Visit script.google.com to get started.


Leave a Comment