Force specific folder to be added to Photos? How can I force media-scanner to index a particular folder?

I use an app that takes photos and stores them in a sub-folder of it's own data folder. The data folder has a .nomedia file, so the photos sub-folder is ignored by Gallery etc. Is there an opposite of .nomedia file?

The data folder has a lot of other files an folders which should be ignored by media-scanner.

The ultimate aim is to have these photos backed up to my Google Photos account.

The target folder is not listed under Google Photos >> Settings >> Backup &amp; Sync >> Device Folders.

I tried creating a symlink from (...)/sdcard/DCIM/foobaz to the (...)/foobaz/data/photos folder but get a message that the operation is not permitted.

Android 7.0, not rooted. (Samsung S6)
Delete the .nomedia file to force media scanning  ( 
restart the phone. It is then that media scanner database is re indexed )
and it should appear in Google photos folder list for sync.
If you don't want that folder to be scanned by media folder at all, create a new folder in gallery ( use a third party file explorer from Play store , if your built in explorer can't do this ) and copy those photos into this folder manually. Verify, it's showing up in Gallery options to sync
Obviously, you wouldn't want to manually do this every time you use that app, so automate it. Macrodroid app implement it this way


Trigger: Application Launched / Closed &rarr; Closed &rarr; Select your app

Action:  File operation &rarr; Select   paths and move / copy options

This ensures that everytime you close your app, pictures are moved / copied into gallery sub folder and available for sync