Finding a folder without specific file?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Valery_Kondakoff
Junior Member
Junior Member
Posts: 92
Joined: 2004-06-27, 15:24 UTC

Finding a folder without specific file?

Post by *Valery_Kondakoff »

is it possible to find a directory, which does not contain a specific file?

for example I want to search a couple of subdirectories in c:\mp3 to find which of them do not have cover.jp*g?

thank you!
CU
VK
User avatar
Stitscher
Power Member
Power Member
Posts: 1058
Joined: 2004-02-17, 12:34 UTC
Location: Hamburg, Germany

Post by *Stitscher »

Hello!

Maybe

Code: Select all

c:\mp3\*.*|cover.jpg |cover.jpeg
works.

But I am not quite sure at the moment.

Stitscher
Valery_Kondakoff
Junior Member
Junior Member
Posts: 92
Joined: 2004-06-27, 15:24 UTC

Post by *Valery_Kondakoff »

Unfortunately this does not work. Your code finds all directories (containing any file) and all the files (except the cover.jp*g).
CU
VK
User avatar
Stitscher
Power Member
Power Member
Posts: 1058
Joined: 2004-02-17, 12:34 UTC
Location: Hamburg, Germany

Post by *Stitscher »

You can press F1 in the search dialog.
Maybe the help can give you a hint.

I am at work at the moment, and can not test.

Stitscher
User avatar
Stitscher
Power Member
Power Member
Posts: 1058
Joined: 2004-02-17, 12:34 UTC
Location: Hamburg, Germany

Post by *Stitscher »

Search dialog-->tab plugins--->enable "Search in plugins"

Plugin - tc
Property - fullname
OP - !Contains
Value - cover.jpg

Stitscher
Valery_Kondakoff
Junior Member
Junior Member
Posts: 92
Joined: 2004-06-27, 15:24 UTC

Post by *Valery_Kondakoff »

Thank you for helping me, but this finds all the files and folders except cover.jpg. (Which fullname does not contyain cover.jpg).
CU
VK
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, to my knowledge this isn't possible, except by writing a custom content plugin.
Author of Total Commander
https://www.ghisler.com
Valery_Kondakoff
Junior Member
Junior Member
Posts: 92
Joined: 2004-06-27, 15:24 UTC

Post by *Valery_Kondakoff »

There is what I'm doing righ now.

1) Searching for all cover.jp*g files in c:\MP3\ and feeding results to listbox (where is my Virtual Panel, btw? :roll: )

2) Selecting all results and saving the selection to file

3) Manually editing the selection file (in GVIM) removing the 'cover.jp*g' part. So, the string 'C:\MP3\CRASH TEST DUMMIES\1993 - GOD SHUFFLED HIS FEET\cover.jpeg' becomes ''C:\MP3\CRASH TEST DUMMIES\1993 - GOD SHUFFLED HIS FEET\'

4) Searching for all folders in c:\MP3\ and feeding results to listbox

5) Loading the selection from a file and inverting the selection. Now I have all folders without 'cover.jp*g' selected.

If anybody knows an easier way of performing this task?
CU
VK
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2Valery_Kondakoff
where is my Virtual Panel, btw?
If I get you right, you may try to hold down SHIFT while pressing 'feed to listbox'. This will open the search results in a new tab.
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

Hi, Valery, I hope you can read Russian.
Look here. There is a script highlighting directories not containing files with a defined extension. I think it can be easily chanded according to your task.
fredvej
Junior Member
Junior Member
Posts: 26
Joined: 2003-03-13, 11:14 UTC
Location: Denmark

Post by *fredvej »

You need a decent command shell like Bash

Bash is available on Windows too, just install Cygwin

Code: Select all

find /cygdrive/c/MP3 -type d | while read DIR
do
  if [ ! -r "$DIR/cover.jp*g" ]
  then
    echo "$DIR/cover.jp*g not found or not readable"
  fi
done
Best regards
Freddy Vejen
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Valery_Kondakoff
Some time ago I added a field named "Content" to my content plug-in "Directory". It's intended to display the files contained in a directory in a tooltip. This field cannot be used in the search in a meaningful way as its length is quite limited. I'm thinking adding another field with support for the search function. Are you interested?
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Lefteous
I am interested too.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
Valery_Kondakoff
Junior Member
Junior Member
Posts: 92
Joined: 2004-06-27, 15:24 UTC

Post by *Valery_Kondakoff »

+1
CU
VK
abraham
Junior Member
Junior Member
Posts: 14
Joined: 2006-10-26, 00:28 UTC

Post by *abraham »

yes please! :D
Post Reply