MATLAB: Reading from and writing to Google Drive

apigoogle-driveMATLAB

I'm fairly new to MATLAB. I'd like to read .nii files stored in a Google Drive folder into my MATLAB script, process them, and write the resulting .mat files into another Google Drive subfolder. I've tried searching for an API but haven't come across anything implementable. My MATLAB version is 9.9.0.1467703 (R2020b).
I came across this potential solution for writing files to Google Drive, but the actual reading and importing is more important of a task for me.
Any guidance would be greatly appreciated!

Best Answer

https://www.mathworks.com/matlabcentral/answers/436564-how-can-i-read-image-from-my-google-drive-process-it-and-sent-the-output-to-my-email-address-imag?s_tid=srchtitle
The difficult part is figuring out the identifier to use. I seem to recall that eventually Chis mentioned something that helped get a directory list, but I do not recall any details.
Related Question