Page 1 of 2
[WISH] Search for empty folders
Posted: 2010-06-08, 13:54 UTC
by miskox
I am sure this was suggested before.
Can Commands/Search (ALT-F7) have a checkbox to find empty folders (just like Commands/Synchrnoze dirs) have it.
Thanks,
Saso
Posted: 2010-06-08, 14:18 UTC
by MVV
You may use
this plugin. Just install it and search for files using plugins tab of find dialog (condition is [dirsizecalc.Empty] = Yes).
Posted: 2010-06-08, 14:19 UTC
by Vochomurka
1. Install the DirSizeCalc plugin;
2. Start search Alt+F7;
3. Clean the "Search in" field;
4. Open the Plugins tab;
5. Plugin = DirSizeCalc, Property = Empty, OP =, Value = Yes;
6. Open the Load/Save tab;
7. Press Save;
8. Enter any name you want, say, EmptyDirs;
9. Create the following button:
Code: Select all
TOTALCMD#BAR#DATA
LOADSEARCH EmptyDirs
wcmicons.dll
0
-1
10. Press this button when you want to find empty directories.
Good luck.
Posted: 2010-06-09, 20:21 UTC
by miskox
Hi,
I managed to get this far
9. Create the following button:
Code: Select all
TOTALCMD#BAR#DATA
LOADSEARCH EmptyDirs
wcmicons.dll
0
-1
10. Press this button when you want to find empty directories.
My button looks like this:
Command: TOTALCMD#BAR#DATA
Parameter: LOADSEARCH EmptyDirs
Start path: (empty)
Icon file:C:\Program Files\totalcmd\WCMICONS.DLL
Icon: 0
Tooltip: -1
When I click on the button I get a popup message: File not found
(I am in a folder that contains at least one empty folder).
Any ideas?
Thanks,
Saso
Posted: 2010-06-10, 07:03 UTC
by MVV
You created wrong button:) command must be
LOADSEARCH EmptyDirs.
Piece of text starting with
TOTALCMD#BAR#DATA (and ending with
-1) it is a button code, if you copy it to clipboard, you can paste it as a button directly to button bar using right click on its free space.

So TC will fill all fields itself in right way.
Posted: 2010-06-11, 06:35 UTC
by miskox
Thanks for the tip. I managed to make a button (first ever - I don't like to customize things - in this way freshly installed TC will have everything I need out of a box - this is the main reason to provide this suggestion - to be independent).
But again, I receive the same error...
I tried two ways:
1. I selected a folder (tmp for example) that contains files/folders (including empty ones)
2. I was IN this folder (tmp)
I get the same error message.
Thanks,
Saso
Posted: 2010-06-11, 08:10 UTC
by Vochomurka
1. Check that you have cleaned the "Search in" field (see item 3 in my post above), and all other items too

;
2. Post here your button (cursor on it - right mouse click - copy - paste it here);
3. Open your wincmd.ini (see Help\About where it is) and find the [Searches] section. There you find some keys starting with EmptyDirs_ (e.g. EmptyDirs_SearchFor=). Copy all these keys and post them here.
Posted: 2010-06-11, 08:50 UTC
by miskox
Search fields (all fields) are empty
My button looks like this:
Code: Select all
TOTALCMD#BAR#DATA
LOADSEARCH EmptyDirs
wcmicons.dll
0
-1
Wincmd.ini [searches] section:
[searches]
EmptyDirs_SearchFor=
EmptyDirs_SearchIn=
EmptyDirs_SearchText=
EmptyDirs_SearchFlags=0|000002000020|||||||||0000
EmptyDirs_plugin="dirsizecalc.Empty = Yes"
If I start Search (alt-f7) and I go to the Load/Save tab and I select EmptyDirs and then I click LOAD and then SEARCH I get the results I need.
How to just get to the same results with just a click?
Thanks for your help.
Saso
Posted: 2010-06-11, 09:12 UTC
by Vochomurka
Very strange. I reproduced all the steps, and my search gave all empty directories.
1. Are you absolutely sure you have empty directories in the current path when you press this button?
2. Compare the look of the Find Files box when you load saved search (not working) and when you pick options manually (working). Is there any difference? Which one?
3. Try another plugin
filex with the similar function. The string must be
Code: Select all
EmptyDirs_Plugin="filex.ZeroSizeDir = 1"
or you can manually set another plugin from the Plugins tab.
4/ Finally, pick manually all the options and checkboxes for you search does work. Then go to the Load/Save tab, press Save, and enter another name, say, GoodEmptyDirs. Then create the LOADSEARCH GoodEmptyDirs button (now you know how).
Posted: 2010-06-11, 10:08 UTC
by miskox
Vochomurka wrote:1. Are you absolutely sure you have empty directories in the current path when you press this button?
Not exactly. When I click Search (ALT-F7) the Search in: field is populated with a current directory.
2. Compare the look of the Find Files box when you load saved search (not working) and when you pick options manually (working). Is there any difference? Which one?
After I load the plugin Search for and Search in are both empty - and then the plugin works.
3. Try another plugin
filex with the similar function. The string must be
Code: Select all
EmptyDirs_Plugin="filex.ZeroSizeDir = 1"
or you can manually set another plugin from the Plugins tab.
I will stick with the current one.
4/ Finally, pick manually all the options and checkboxes for you search does work. Then go to the Load/Save tab, press Save, and enter another name, say, GoodEmptyDirs. Then create the LOADSEARCH GoodEmptyDirs button (now you know how).
Does not work either.
Anyway. It works with some more clicks. I don't need this option very often so I will use this one.
Thanks to all of you for your answers. Consider this topic (plugin solution) complete, wish remains.
Saso
Posted: 2010-06-11, 11:03 UTC
by Vochomurka
After I load the plugin Search for and Search in are both empty - and then the plugin works
When I test settings you had provided, then the Search in field is AUTOMATICALLY filled with the current path. In fact, TC can't find files nowhere (what is actually set in saved search, because the _SearchIn key is empty), and thus it fills the search path with the default (current) path.
I repeat: if some of your command works, then clean the Search in field, and save these search settings. It will work anyway and anytime.
wish remains
I bet Mr. Ghisler will NOT implement this wish because this task can be easily solved with at least two plugins. There are TOOOOOO many user wishes in his todo list

Posted: 2010-06-11, 12:45 UTC
by miskox
repeat: if some of your command works, then clean the Search in field, and save these search settings. It will work anyway and anytime.
wish remains
I bet Mr. Ghisler will NOT implement this wish because this task can be easily solved with at least two plugins. There are TOOOOOO many user wishes in his todo list

Does not work either. One question: please explain this command
LOADSEARCH EmptyDirs
What is this 'LOADSEARCH'? Is this a TC internal command or something? If I try and execute this (for example from a DOS command prompt or TC command line) I receive a file not found error. Maybe this is the reason why the button does not work for me?
Thanks,
Saso
Posted: 2010-06-11, 12:54 UTC
by Vochomurka
Have you ever tried to press the F1 key

?
1. Point the mouse on the button bar, right-click and "Change...", or just Options\Change button bar. So, create a new button;
2. Press the magnifying glass button to the right of the Command field;
3. Category: Commands with paramaters;
4. Do you see the "LOADSEARCH <stored search>" string? Pick it and fill name of your saved search after the LOADSEARCH keyword.
TC help wrote:10. LOADSEARCH saved_search_name opens search function with saved search
Posted: 2010-06-11, 13:02 UTC
by miskox
Do you want to know a secret? I was using version 6.56 (or something). In that version there is no magnifying glass - this what triggered and I checked the version). Just upgraded to 7.50 and it works like a charm. First I thought if there is a problem with a registered/unregistered version (I have a demo version still - I have to press an 1-2-3 button when TC starts).
I am very sorry for all the troubles.
Saso
Posted: 2010-06-11, 16:58 UTC
by MVV
Maybe TC 6.56 just didn't have LOADSEARCH command (sorry but I'm so lazy to find it in history.txt).

Anyway great that you've got it!