course bg
EduPristine>Blog>Auto expiration date to share Google Drive files and folders temporarily

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 Author

avatar EduPristine

EduPristine is a member of Adtalem Global Education (NYSE: ATGE), a global education provider headquartered in the United States. Adtalem is a 3 billion dollars (20,000 crores) company that has about 9 institutions and companies with more than 16,000 employees spread across 145 locations. Adtalem takes pride in training 142,000 degree-seeking students all over the world.The organization's purpose is to empower students to achieve their goals, find success and make inspiring contributions to our global community. EduPristine is one of India's leading training providers in Analytics, Accounting, Finance, Healthcare, and Marketing. Founded in 2008, EduPristine has a strong online platform and network of classrooms across India and caters to self-paced learning and online learning, in addition to classroom learning


Interested in this topic?

Our counsellors will get in touch with you with more information about this topic.

* Mandatory Field

Post ID = 71567