GALLERY - Howto Prevent Indexing Certain Directories

Search This thread

SemperAndroid

Senior Member
Nov 3, 2010
67
15
Viera, FL
I have a folder on my SD card that I don't want images to appear from. Is there a means to exclude certain directories?

Sent from my DROIDX using XDA Premium App
 

kyouko

Senior Member
Mar 6, 2010
1,091
251
What kind of images don't you want to show up in your gallery? ;)

The .nomedia method should work for you, if not you can always rename the folder with a "." at the beginning to make it hidden

Folder name examples:
.pr0n / .dontlookhere / .ignore
 
  • Like
Reactions: -V-O-Y-A-G-E-R-

JMMusic

Senior Member
Jul 24, 2010
137
10
Frankfort, KY
What kind of images don't you want to show up in your gallery? ;)

The .nomedia method should work for you, if not you can always rename the folder with a "." at the beginning to make it hidden

Folder name examples:
.pr0n / .dontlookhere / .ignore

.nomedia works for me, as far as keeping stuff out of the gallery. Being all grown up in my computer usage, I choose to not let my computing devices hide stuff from me, so that .folder thingy doesn't work for me (and pictures in those .folders without a .nomedia file still seem to make their way into my gallery).

I do have a .stuff folder for my .porn though... Keeps it up near the top of the list... :)
 

cpark_12

Senior Member
Feb 16, 2011
340
7
Cairo, GA
how about the hideitpro app from the market? it's actually pretty cool. opens up as an audio manager, then you put in a password and there you have all the hidden files you want. not just pics...just an fyi
 

whipping

Senior Member
Sep 23, 2010
174
20
Install the app Just Pictures and ignore the folders you don't want to see.
The .nomedia "solution" prevents the album art to display in the media players.
 

MrToilet

Member
Jun 25, 2009
6
0
I use the app QuickPic from the Market, and in the app you can choose which folders you want include and exclude. Pretty useful. You don't have the pretty 3-D effects from the default Gallery app but it's so much faster.
 

RavenFB

Senior Member
Nov 26, 2010
106
19
New Douglas, Illinois
You can do the same thing with Fishbowl Gallery. You can set default albums, as well as hide albums. However, this still doesn't prevent someone from stumbling upon the default gallery app. The best solutions are either .nomedia, or do not have media on your phone that you do not want prying eyes to see. Alternatively, while cumbersome, you can use androzip or unrar pro to zip the material in question. Of course, by zipping your files, you can add the additional layer of security by encrypting it, if you're the paranoid sort.

Sent via Tapatalk on CM7.0.0-Vision Stable.
 

KCRic

Senior Member
Aug 4, 2010
1,230
268
Overland Park
I remember this method. Any one know if the older file deletion ever got fixed with 2.2.1 or later?

If you don't know what I'm talking about here's a quick rundown.

You put the .nomedia file in a folder with pictures, upon reboot all those pictures are deleted. This had something to do with them already being scanned once and them being older than the .nomedia file so instead of ignoring them it deletes them. Something along those lines (anyone have the link to the original bug report from back in '08 or '09?).

Anyway, if it hasn't been fixed you've been warned, you stand a good chance of losing all media in those folders. So backup those files - but you knew that already;)

The easiest remedy to this is to remove the files, rename the folder to .whatever or insert the .nomedia file. Reboot. Then throw the files back onto the sdcard. That should eliminate any issues.
 

travisn000

Senior Member
Oct 13, 2007
176
33
I've used the .nomedia solution awhile back to get icons, cover art, etc out of my gallery and it worked just fine... nothing was deleted (Droid X).

IIRC, I did have to clear the gallery app's cache to get it to "forget" about media that it had already found; on first lauch after clearing it's cache, expect it to be slow as it re-scans your device / sd card (..rebooting didn't work to clear the cach on my device... had to clear it via settings > application > manage apps..)
 
  • Like
Reactions: degry

degry

Member
Aug 30, 2008
7
0
Antibes
.nomedia file solution works :)

I remember this method. Any one know if the older file deletion ever got fixed with 2.2.1 or later?

If you don't know what I'm talking about here's a quick rundown.

You put the .nomedia file in a folder with pictures, upon reboot all those pictures are deleted. This had something to do with them already being scanned once and them being older than the .nomedia file so instead of ignoring them it deletes them. Something along those lines (anyone have the link to the original bug report from back in '08 or '09?).

Anyway, if it hasn't been fixed you've been warned, you stand a good chance of losing all media in those folders. So backup those files - but you knew that already;)

The easiest remedy to this is to remove the files, rename the folder to .whatever or insert the file. Reboot. Then throw the files back onto the sdcard. That should eliminate any issues.

The .nomedia file solution works fine for me on Android 2.3.3.
The issue you mentioned is therefore fixed (nothing file was deleted unexpectedly).
Reboot was also necessary so that the native photo gallery app does not display the icons/pics any longer for the folders where I added the .nomedia file.

Furthermore, this works also for the music files.
(I use also TapeMachine app, and wanted to avoid that the sounds I recorded are listed in the Music Player).
 

HoustonGeek

Member
Feb 16, 2012
28
2
Houston
Yes, it does. I just placed a .nomedia file in my /Music folder on my extsdcard and all the pictures in my albums are gone after a reboot.

UPDATE: I just tied this on my tablet (running 4.4.2) and it did not need a reboot. Gallery adjusted automatically. It was a folder on the extsdcard - and since 4.4.x restricts access to the sdcard, it stands to reason it saw the file placed and adjust the library automatically.

If I place a .nomedia file in a directory, does that exclude all of its subdirectories from the gallery, as well?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Put an empty file called .nomedia in the directory.
    1
    This one works well for me - makes the process easier:
    https://market.android.com/details?id=com.studiokuma.nomedia
    1
    What kind of images don't you want to show up in your gallery? ;)

    The .nomedia method should work for you, if not you can always rename the folder with a "." at the beginning to make it hidden

    Folder name examples:
    .pr0n / .dontlookhere / .ignore
    1
    I've used the .nomedia solution awhile back to get icons, cover art, etc out of my gallery and it worked just fine... nothing was deleted (Droid X).

    IIRC, I did have to clear the gallery app's cache to get it to "forget" about media that it had already found; on first lauch after clearing it's cache, expect it to be slow as it re-scans your device / sd card (..rebooting didn't work to clear the cach on my device... had to clear it via settings > application > manage apps..)