Skip to content

Python script to recursively list all files from a target folder in Google Drive

Notifications You must be signed in to change notification settings

araujodavid/python-google-drive-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-google-drive-api

Python script to recursively list all files from a target folder in Google Drive.

Install dependencies:

$ pip install -r requirements.txt

To run the script, you need to enable access to the Google Drive API and download the access credentials.

Access this link and authenticate with the desired account.

Google will give you the option to download in a JSON file.

After that, move the file to the project folder and rename it to credentials.json.

Another important point: it's necessary to provide the ID of a folder that will be used as a starting point to recover the files.

This ID must be placed in the variable ROOT_FOLDER_TO_SEARCH.

Run the script:

$ python main.py

At the end of the execution, the script will create a file with the list of all folders and another file with the list of all files.

About

Python script to recursively list all files from a target folder in Google Drive

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages