I want to write a program that compares the filenames and subfolder names in two directories containing roughly 100,000 files and folders—about 650 GB of data in total. I have programmed professionally since 1979, but I am new to Android, PCs, and Python, and I do most of my work directly on my phone.
I have tried several Android file-management and comparison apps, but they seem to be limited by Android's storage permissions. Is this comparison possible without rooting the phone? I would prefer to run it locally and repeat it regularly because transferring everything to a PC takes a very long time.
Would Python be suitable for this, and are there existing scripts or general approaches I should use? The phone is a Samsung S25 Ultra with advertised 1 TB storage, of which approximately 0.91 TB is usable.
2 Answers
If the eventual goal is to transfer selected files, comparing names first and then placing the needed files into one directory can help. Creating one archive, such as a tar file, before transferring may be faster than copying thousands of individual files. Transfers through some phone protocols are particularly slow because they handle files one at a time.
Yes, this is possible if you can give a terminal application access to the directories. Termux is a common option, and Python can be installed there. Android’s scoped-storage permissions may prevent access to arbitrary locations, though, so you may need to grant Termux storage access or work within directories it is allowed to read. Rooting is not necessarily required, but access depends on where the files are stored and the Android version.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically