I am trying to find a way to list all files, and related file sizes, in all folders and all sub folders. I guess these are called blobs, in the Databricks world. Anyway, I can easily list all files, and related file sizes, in one single folder, but I can't come up with Python code that lists ALL files and the sizes of each of these files. Just for reference, on a desktop machine the code would look like this.
import sys, os
root = "C:\\path_here\\"
path = os.path.join(root, "targetdirectory")
for path, subdirs, files in os.walk(root):
for name in files:
print(os.path.join(path, name))
Maybe there is a non-Python way to do this. I'd like to get an inventory of all the files in Blob Storage, any way I can.