—
Print all local data files.#
This script prints all data files synchronized on this local machines. Files are not necessarily downloaded.
The script uses sda.api.load.list_all_files() which
looks into all the Data Sharepoints synchronized on this machine either
by having clicked the “Sync” (recommended) or “Add a Shortcut to my Drive”
(not recommended, but works) buttons from the online Sharepoint / Documents page.
Data Sharepoints local links must be defined in the local “~/sda.json” configuration file.
First, we import the required libraries.#
from sda.api.load import list_all_files
# Retrieve all files.
file_paths = list_all_files(filter="*.xls*", max_recursion_level=2)
print(f"Found {len(file_paths)} files. Here are the paths:")
for i, path in enumerate(file_paths):
print(f"{i:03}: {path}")