Can I Compare Filenames and Subfolders Directly on an Android Phone?

0
0
Asked By MellowCedar47 On

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

Answered By BriskWillow24 On

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.

Answered By OrbitLime82 On

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.