347 647 9001+1 714 797 8196Request a Call
Call Me

Auto expiration date to share Google Drive files and folders temporarily

February 20, 2015
, , , ,

As we all know that the files and folders saved on your Google drive can be shared with other people. When you share those files or folders with them, the recipients receive them in their Google Drive to which they have access on a permanent basis unless you change the access permissions manually. Now the problem arises when you feel that these shared items are no longer required in the recipient’s Google Drive or if you don’t want the recipient to see them after a certain period of time. You don’t have the option to set date and time for these files when you share them. This is when you can add the auto Expire feature to your shared files.

Adding Auto Expire feature to the files you share, make them unavailable and inaccessible after a certain period of time which you can specify as per your requirement. It enables you to share the files and folders on a temporary basis. This feature automatically disables the sharing option for the specified file or folder at the specified date and time. All you have to do is set a date, time and include the link to the file you are sharing or have already shared in the Google Script.

How to activate Auto expiration feature?

We have explained below all the steps in detail to help you out with activating Auto expiration.

1. Make a copy of Google Script in your Google Drive by clicking on Google Script.

Google Script Source:Labnol

2. After you have clicked on Google Script, you need to enter the link to your shared folder or the file which you want to be inaccessible to the recipient(s) in line number 3. Enter the date and time you want to set for Auto expiration in line number 7 (Use YYYY-MM-DD format for date and HH:MM format for time).

How to enter link, time and date in Google Script

3. After entering the link and time-date in the script, go to ‘File’ option and choose ‘Project Properties’. Here you have to select your ‘timezone’ from the drop down option. The date and time which you will set for Auto expiration will use this timezone so choose it carefully.

How to open Project properties for changing time zone

How to change the timezone with the help of drop down option in Google Scripts

4. Once you are done with entering the link, setting date and time and selecting timezone, you have to go to the ‘Run’ option. Select start and it will ask you for authorization. Click on continue and once the authorization is complete then again go to the ‘Run’ option and select Auto Expire.

How to run and activate Auto Expiry in Google Scripts

Authorization window when you run the Google script

Congratulations! You have successfully assigned Auto expiration to your file/folder. You can now close the Google Script window. Now as per the mentioned time, when the time is up, that link will Expire and the recipient will not be able to see the shared file or the folder. Recipient will get the “Access denied” message:

Message to the recipient when the link expires

This was a short tutorial on how Auto Expire feature works on Google Drive. How helpful this Auto Expire feature can be for you and others?


About the Author

Trusted by Fortune 500 Companies and 10,000 Students from 40+ countries across the globe, it is one of the leading International Training providers for Finance Certifications like FRM®, CFA®, PRM®, Business Analytics, HR Analytics, Financial Modeling, and Operational Risk Modeling. EduPristine has conducted more than 500,000 man-hours of quality training in finance.


Global Association of Risk Professionals, Inc. (GARP®) does not endorse, promote, review or warrant the accuracy of the products or services offered by EduPristine for FRM® related information, nor does it endorse any pass rates claimed by the provider. Further, GARP® is not responsible for any fees or costs paid by the user to EduPristine nor is GARP® responsible for any fees or costs of any person or entity providing any services to EduPristine Study Program. FRM®, GARP® and Global Association of Risk Professionals®, are trademarks owned by the Global Association of Risk Professionals, Inc

CFA Institute does not endorse, promote, or warrant the accuracy or quality of the products or services offered by EduPristine. CFA Institute, CFA®, Claritas® and Chartered Financial Analyst® are trademarks owned by CFA Institute.

Utmost care has been taken to ensure that there is no copyright violation or infringement in any of our content. Still, in case you feel that there is any copyright violation of any kind please send a mail to and we will rectify it.

Popular Blogs: Whatsapp Revenue Model | CFA vs CPA | CMA vs CPA | ACCA vs CPA | CFA vs FRM

Post ID = 71567