Skip to content Skip to sidebar Skip to footer

List All Title + Id Of A Googledrive Content Folder In Google Colab

Given the timing of Google Colab, I usually store my Google Drive activities in a DDMMYY folder (Day, month and year). Every day the content is stored like this. Images, code, draf

Solution 1:

This metadata is stored in extended file attributes. You can retrieve them using the xattr command.

Here's a complete example: https://colab.research.google.com/drive/16ylOxW_AyON1CMvjlT8rBAlDTpnR5fEa

The key bits:

# Installing the xattr tool.
!apt-get install -qq xattr

# Retrieving the file ID for a file in `"/content/drive/My Drive/"`:
!xattr -p 'user.drive.id' file

# Retrieving the title
!xattr -p "user.drive.itemprotostr" created.txt | grep'title:'

Post a Comment for "List All Title + Id Of A Googledrive Content Folder In Google Colab"