Find folders that contain .jpgs and have an empty parent folder (besides itself)

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
JTCGiants56
Posts: 190
Joined: Fri Nov 28, 2014 3:58 pm

Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by JTCGiants56 »

I have many sets of pictures where the folder path is for example Pictures\Holidays\Florida\pics

In which the "Florida" folder is empty besides the "pics" folder and all the actual .jpgs are located in "pics". I'd like to identify folders similar to "pics" so I can move the files up one level. So i'm pretty much looking for folders that contain .jpgs (and no subfolders of their own) and have an empty parent (besides itself).

Is this possible? Wasn't able to figure it out with the advanced search.

Thanks in advance.
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by void »

Please try finding folders with 0 child files:
pictures\ childfilecount:0

-or-

Find folders that do not contain a jpg file:
pictures\ folder: !child:*.jpg
JTCGiants56
Posts: 190
Joined: Fri Nov 28, 2014 3:58 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by JTCGiants56 »

void wrote: Thu Feb 21, 2019 12:16 am Please try finding folders with 0 child files:
pictures\ childfilecount:0

-or-

Find folders that do not contain a jpg file:
pictures\ folder: !child:*.jpg
Hello, I had updated my post above to better clarify what I was looking for before, unsure if you had seen the latest edit.

I don't think the above will achieve what I'm looking for.

I'm looking to find folders that contain .jpg files (and no subfolders) and the parent folder contains no files but this subfolder. The folder names could be anything, I just used pics as an example. Should have clarified.

I've come up with the below. But I don't know how to achieve making sure the parent (Florida folder in the above post example) is empty besides the one subfolder which contains the .jpgs (pics folder in the above example).

Code: Select all

!c: parents:2..10 child:*.jpg childfilecount:5..8000 childfoldercount:0 
Thanks for your help, let me know if you need me to clarify further.
JTCGiants56
Posts: 190
Joined: Fri Nov 28, 2014 3:58 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by JTCGiants56 »

void wrote: Thu Feb 21, 2019 12:16 am Please try finding folders with 0 child files:
pictures\ childfilecount:0

-or-

Find folders that do not contain a jpg file:
pictures\ folder: !child:*.jpg
Hi void, any other ideas on this?
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by void »

Currently, Everything does not have a search to find folders where their parents do not contain a jpg file.

I would have to add a search function to do this, such as !parentfilename:*.jpg
...added to my TODO list.

To list folders that contain no jpg files, but one of their subfolders does, such as your Florida folder, please try:
  • In Everything, type in the following search:
    ext:jpg
  • From the File menu, click Export.
  • Change save as type to EFU file list.
  • Choose a file name and click Save.
  • From the File menu, click Open File list...
  • Select the file list saved above and click OK.
  • Type in the following search:
    !child:*.jpg folder: childfoldercount:>=1
    This will list folders that do not have jpg files, but one its subfolders does.
When you are finished with this list, close your currently opened file list:
  • From the File menu, click Close file list.
JTCGiants56
Posts: 190
Joined: Fri Nov 28, 2014 3:58 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by JTCGiants56 »

void wrote: Wed Feb 27, 2019 5:03 am Currently, Everything does not have a search to find folders where their parents do not contain a jpg file.

I would have to add a search function to do this, such as !parentfilename:*.jpg
...added to my TODO list.

To list folders that contain no jpg files, but one of their subfolders does, such as your Florida folder, please try:
  • In Everything, type in the following search:
    ext:jpg
  • From the File menu, click Export.
  • Change save as type to EFU file list.
  • Choose a file name and click Save.
  • From the File menu, click Open File list...
  • Select the file list saved above and click OK.
  • Type in the following search:
    !child:jpg folder: childfoldercount:>=1
    This will list folders that do not have jpg files, but one its subfolders does.
When you are finished with this list, close your currently opened file list:
  • From the File menu, click Close file list.
Thank you for your help. Would it be possible to list out the sub-folders that contain the jpgs themselves?
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by void »

Would it be possible to list out the sub-folders that contain the jpgs themselves?
Please try the following search:
!child:*.jpg
JTCGiants56
Posts: 190
Joined: Fri Nov 28, 2014 3:58 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by JTCGiants56 »

void wrote: Wed Feb 27, 2019 8:31 am
Would it be possible to list out the sub-folders that contain the jpgs themselves?
Please try the following search:
!child:*.jpg
Sorry, I think I may be explaining this poorly.

Would it be possible to list folders that don't contain ANY folders or files except one folder that contains .jpgs?

Apologies if you've answered this and i've misunderstood.
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by void »

I don't have an easy solution with the current version of Everything, sorry.

I'm going to add a search function childfilelist:filename1;filename2;"filename3" to make this easier, eg, you could search for child:*.jpg, copy the current results and paste them as a childfilelist: operation with childfilecount:0 and childfoldercount:1

Do you feel comfortable renaming these folders?
You could rename all your folders containing jpgs, and do a child search on those renamed folders:
  • search folder child:*.jpg
  • Make sure you sort by path descending.
  • Select all results
  • Press F2.
  • Make sure Regex is unchecked
  • Make sure Old Format is: %1
  • Change New Format to: _ISJPG_%1
    This will rename all the selected folders.
  • Click OK.
  • Search for child:_ISJPG_* childfilecount:0 childfoldercount:1
To restore your folder names:
  • Search for:
    _isjpg_*
  • Make sure you sort by path descending.
  • Select all results
  • Press F2.
  • Make sure Regex is unchecked
  • Make sure Old Format is: _ISJPG_%1
  • Change New Format to: %1
    This will rename all the selected folders.
  • Click OK.
JTCGiants56
Posts: 190
Joined: Fri Nov 28, 2014 3:58 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by JTCGiants56 »

void wrote: Sat Mar 02, 2019 12:21 pm I don't have an easy solution with the current version of Everything, sorry.

I'm going to add a search function childfilelist:filename1;filename2;"filename3" to make this easier, eg, you could search for child:*.jpg, copy the current results and paste them as a childfilelist: operation with childfilecount:0 and childfoldercount:1

Do you feel comfortable renaming these folders?
You could rename all your folders containing jpgs, and do a child search on those renamed folders:
  • search folder child:*.jpg
  • Make sure you sort by path descending.
  • Select all results
  • Press F2.
  • Make sure Regex is unchecked
  • Make sure Old Format is: %1
  • Change New Format to: _ISJPG_%1
    This will rename all the selected folders.
  • Click OK.
  • Search for child:_ISJPG_* childfilecount:0 childfoldercount:1
To restore your folder names:
  • Search for:
    _isjpg_*
  • Make sure you sort by path descending.
  • Select all results
  • Press F2.
  • Make sure Regex is unchecked
  • Make sure Old Format is: _ISJPG_%1
  • Change New Format to: %1
    This will rename all the selected folders.
  • Click OK.
Thank you so much. I'd rather not do the rename operation as I have thousands of folders. I think I will wait for your new version.

But for the actual output results, with this new addition, will it be able to list the folder itself directly containing the jpgs? Would I be able to list all the "floridapics" folders (see below example) with the above change? Essentially the folders that directly contain the .jpgs and have a parent that ONLY contains this one subfolder and no other folders\files?

For example:
Florida (ONLY contains one subfolder and no files) > flordiapics > 1.jpg..5.jpg (etc)

I'd like the results to display all the "floridapics"-like folders.

Thanks for your help, really appreciate it!
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by void »

But for the actual output results, with this new addition, will it be able to list the folder itself directly containing the jpgs?
Either,
Lists Florida with the childfilelist:... search or
Lists flordiapics with the child:*.jpg siblingcount:0 search.
JTCGiants56
Posts: 190
Joined: Fri Nov 28, 2014 3:58 pm

Re: Find folders that contain .jpgs and have an empty parent folder (besides itself)

Post by JTCGiants56 »

void wrote: Sun Mar 03, 2019 4:28 am
But for the actual output results, with this new addition, will it be able to list the folder itself directly containing the jpgs?
Either,
Lists Florida with the childfilelist:... search or
Lists flordiapics with the child:*.jpg siblingcount:0 search.
Okay, great!
Post Reply