Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

Question for my fellow Everything lovers 8-) :geek: :

On my server, it's easiest for me to delete video files from within my Plex client right after I watch them. This leaves their parent folders and sub folders behind, but I have various methods of cleaning those up periodically. I'm having trouble cleaning the "Sample" videos that are included with some, while leaving the sample files for undeleted videos. The sample's parent folder almost always contains other small files and folders, so are not actually empty, but are always less than 50mb. Thus, the problem: The sample files can be up to 200mb. I also have legit videos that are between 50-200mb. (I can easily find the folders under 50mb by other means.) (Also, the files are no longer listed in my torrent client either so deleting "errored" torrents from there is not an option. That is what I normally do though.)

For example:
Sample I want to keep
V:\Videos\Movies\This.Great.Movie.720p\
This.Great.Movie.720p.mkv 802MB
This.Great.Movie.720p.nfo 39kb
Subs\
English.srt 276kb
French.srt 194kb
Sample\
This.Great.Movie.720p.sample.mkv 58mb

Sample I want to delete
V:\Videos\Movies\The.Best.Movie.1080p\
The.Best.Movie.1080p.nfo 16kb
Subs\
English.srt 128kb
French.srt 47kb
Sample\
The.Best.Movie.1080p.sample.mkv 194mb

So far I've come up with a long string that still contains legit video files I want to keep, so it doesn't really work. Can I filter the size of the parent folder, not including sub folders? Any other suggestions to make my query better are welcome. Thanks in advance!

Current Query:
dir: "@Complete Files"/ size:<200mb !sample !sample/ !attrib:L !.actors !.actors/ !subs/ !subs !subtitles/ !subtitles !extras/ !Extras !screens/ !screens !covers/ !covers !soundtrack !soundtrack/ !Featurettes/ !Featurettes !"Bonus Material/" !"~ Music/" !"~ Software/" !"~ Ebooks/"


Edit: My query result didn't work so I noted that.
Last edited by gggirlgeek on Sat Apr 27, 2024 2:11 am, edited 1 time in total.
void
Developer
Posts: 16839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by void »

Is the following search helpful:

Find folders directly in V:\Videos\Movies where the total folder size is less than 200MB:

folder: V:\Videos\Movies\* size:<200mb



or, find folders directly in V:\Videos\Movies where there's no 'video' file directly in the folder:

folders: V:\Videos\Movies\* !child:video:
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

Thanks for the response.

The problem is that the files I'm looking for are both "video" files. And they are both between 50-200mb. The only difference is that the Parent folder of the "Sample" folder will be under 50mb if I've deleted the real video file -- NOT INCLUDING THE "Sample" sub folder.
void
Developer
Posts: 16839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by void »

From what I understand you want to delete the folder:

V:\Videos\Movies\The.Best.Movie.1080p



Do you only want to delete the sample file:

V:\Videos\Movies\The.Best.Movie.1080p\Sample\The.Best.Movie.1080p.sample.mkv



or delete the sample folder:

V:\Videos\Movies\The.Best.Movie.1080p\Sample
void
Developer
Posts: 16839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by void »

I think I understand, you want to delete V:\Videos\Movies\The.Best.Movie.1080p\Sample



You would need to do this with two passes:

Search for:

folder: V:\Videos\Movies\* size:<200mb
-or-
folders: V:\Videos\Movies\* !child:video:

Select all folders and copy the filenames with Ctrl + Shift + C
Change the search to:

parentfilelist1: folder: sample

Right click the parentfilelist1: text in the search box and click Edit File List Slot...
Paste your filenames
Click OK.



This would have been another useful case for parentsize: ...I'll have to add this.
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

I found a long string that might work:
dir: "@Complete Files"/ child:sample size:<200mb !sample !attrib:L !.actors !subs !subs/ !subtitles !Extras !screens !screenshots !other !proof !covers !soundtrack !Featurettes !Featurettes !"Bonus Material" !"~ Music/" !"~ Software/" !"~ Ebooks/"


But I haven't read through your suggestions yet....
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

void wrote: Sat Apr 27, 2024 2:20 am From what I understand you want to delete the folder:

V:\Videos\Movies\The.Best.Movie.1080p



Do you only want to delete the sample file:

V:\Videos\Movies\The.Best.Movie.1080p\Sample\The.Best.Movie.1080p.sample.mkv



or delete the sample folder:

V:\Videos\Movies\The.Best.Movie.1080p\Sample
I want to delete the whole parent folder, including the Sample folder, only if it does not contain a video directly inside it. The sub folder: "Sample", will contain a video. I only want to keep it if there is another video in Sample's parent folder.
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

void wrote: Sat Apr 27, 2024 2:28 am I think I understand, you want to delete V:\Videos\Movies\The.Best.Movie.1080p\Sample
No I want to delete the parent folder V:\Videos\Movies\The.Best.Movie\

Not just \Sample\
void
Developer
Posts: 16839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by void »

Thank you for clarifying.



Search for:

folder: V:\Videos\Movies\* size:<200mb !child:video:

This will list folders directly in V:\Videos\Movies where the folder size is less than 200MB and it doesn't directly contain a video file.



Make a backup of the folder names before deleting:
From the File menu, click Export....
Change Save as type to: EFU Everything File List.
Choose a filename and click Save.
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

void wrote: Sat Apr 27, 2024 2:28 am parentfilelist1: folder: sample

Right click the parentfilelist1: text in the search box and click Edit File List Slot...


Whoa! New tricks!

This might be something.

What does parentfilelist1: do?
What does "Edit File List Slot" do?
void
Developer
Posts: 16839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by void »

File List Slots

File list slots allow you to do multiple search passes.

eg: search for files that are related to a different search for files.
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

void wrote: Sat Apr 27, 2024 2:51 am Thank you for clarifying.



Search for:

folder: V:\Videos\Movies\* size:<200mb !child:video:

This will list folders directly in V:\Videos\Movies where the folder size is less than 200MB and it doesn't directly contain a video file.



Make a backup of the folder names before deleting:
From the File menu, click Export....
Change Save as type to: EFU Everything File List.
Choose a filename and click Save.
I'll try it.

Why would I back up the folder names? How would they help with recovery?
void
Developer
Posts: 16839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by void »

Open some of the folders and double check they are 'watched' folders and safe to delete.



Backup the names if ever wanted to remember what you watched or what you deleted..

The folders will be small, so you could move them to another folder if you wanted to keep them.
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

gggirlgeek wrote: Sat Apr 27, 2024 3:00 am
void wrote: Sat Apr 27, 2024 2:51 am Thank you for clarifying.



Search for:

folder: V:\Videos\Movies\* size:<200mb !child:video:

This will list folders directly in V:\Videos\Movies where the folder size is less than 200MB and it doesn't directly contain a video file.



Make a backup of the folder names before deleting:
From the File menu, click Export....
Change Save as type to: EFU Everything File List.
Choose a filename and click Save.
I'll try it.

Why would I back up the folder names? How would they help with recovery?
YES! THAT WORKED!!! Thanks. 8-)

I tried this query from above:
folder: "V:\Shared\@complete files\*" size:<200mb !child:video:

I removed the asterisk though because I get no folders, only symlinks strangely. So the query is:

Code: Select all

folder: "V:\Shared\@complete files\" size:<200mb !child:video:  
So my final query that works (with custom exclusions I need) is:
folder: "@Complete Files\" size:<200mb !child:video: !attrib:L !.actors !subs !subs/ !subtitles !Extras !screens !screenshots !other !proof !covers !soundtrack !Featurettes !Featurettes !"Bonus Material" !"~ Music/" !"~ Software/" !"~ Ebooks/" !"__7cooking/"


I thought I would need to exclude "Sample" but it works without it. I guess
!child:video
was what I was looking for. Voila! I will make THAT a filter. :ugeek:
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

Yes, parent-folder-size would be handy.
gggirlgeek
Posts: 52
Joined: Tue Dec 28, 2010 4:54 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by gggirlgeek »

BTW is it child:video or child:video: ?
void
Developer
Posts: 16839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query suggestions please: Parent folder below a size, not including sub folder? Or another way?

Post by void »

child:video:

video: will expand to the search in your Video filter.

child:video:
=> child:ext:3g2;3gp;3gp2;3gpp;amv;asf;asx;avi;bdmv;bik;d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc;fli;flic;flv;hdmov;ifo;ivf;m1v;m2p;m2t;m2ts;m2v;m4b;m4p;m4v;mkv;mp2v;mp4;mp4v;mpe;mpeg;mpg;mpls;mpv2;mpv4;mov;mts;ogm;ogv;pss;pva;qt;ram;ratdvd;rm;rmm;rmvb;roq;rpm;smil;smk;swf;tp;tpr;ts;vob;vp6;webm;wm;wmp;wmv
Post Reply