on-internet
← Community

Is there a way to read the file name from a URL in Google Drive?

Stack Overflow ·

I'm writing a Python Program in Google Colab, and I want to automatically name a new created excel file based on the input file name. I read the input data through the following code: file_id = '1_abcdefg' downloaded = drive.CreateFile({'id': file_id}) downloaded.GetContentFile('exported.xlsx') Is there a way to determine the actual xslx file name in Google Drive from the url '1_abcdefg'?

Comments

Sign in or sign up to comment and upvote.

No comments yet.