Useful applications for Everything

General discussion related to "Everything".
Post Reply
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Useful applications for Everything

Post by NotNull »

As I'm fairly new to Everything, I'm just starting to discover the power and possibilities of it.
Beside the (obvious) searching for files, it can do so much more. I'm looking for inspiration to extend my current usage of Everything. At this moment that consists of:

* A replacement for Explorer's Alt-Enter to calculate the folder size
* Finding the largest files on disk
* Finding duplicates of files

And as I'm doing quite a lot on the command-line (using ES.exe):
* Go to a folder by entering a partial foldername (like: QCD m32 does a CD to the System32 folder.
* Go to a folder where a file is located (CDF myfile does a CD to the folder where the file myfile.txt is located )
* Find files with possible CMD problems. (characters like % , & and ^ can be used in Explorer, but have special meaning in CMD)


So, how do *you* integrate Everything in your daily computer life to make it a little easier?

(I searched the forums fore some similar thread, but could not find any. If there is one, please let me know ...)
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Useful applications for Everything

Post by NotNull »

@therube: Very nice! Thanks!!
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Useful applications for Everything

Post by NotNull »

BTW: here's the QCD.CMD script to CD to a folder by giving a partial foledrname.
It was original a oneliner for TCC (jpsoft's "CMD on steroids"), but I converted it to CMD for .. well, for fun actually (and maybe someone else has some use for it).

I intended to add incrementing the run-count for the chosen folder to put the most selected folder on top, but run-count was only introduced in a very recent version (IIRC), so to prevent problems, I left it out. If someone is interested, let me know and I will add it.

- Start QCD without parameters to get some help.
- Change the location of ES.exe in the script to reflect your situation
(it's under the SETTINGS header : set ES=C:\TOOLS\EVERYTHING\ES.EXE )

Code: Select all

@Echo off
rem debug echo on
    REM 2DO:
    REM present next page of found folders (?)
    REM Add run-count
::________________________________________________________________________
::
::              SETTINGS
::________________________________________________________________________
::
:: location of ES.EXE (without surrounding quotes)
    set ES=C:\TOOLS\EVERYTHING\ES.EXE
:: What to do with the found path?
    rem set COMMAND=CD /D
    set COMMAND=pushd

::________________________________________________________________________
::
::              Search matching folders; create menu entries
::________________________________________________________________________
::
    if .%1. == .. goto :SYNTAX
    setlocal enabledelayedexpansion
       set tel=0
       echo.
    :: Enumerate first 10 folders
        for /f "usebackq delims=" %%x in (`"%ES%" /ad %*`) DO (
            if !tel! LEQ 9 (
            set optie!tel!=%%x
            set choices=!choices!!tel!
            set /a tel+=1
            )
        )

    :: %tel% represent the number of matching folders

        if %tel% == 0 (echo No matching folders .... & set KEUZE=.)
        if %tel% == 1 set KEUZE=%optie0%
        if %tel% GEQ 2 call :MENU

    endlocal & if "%KEUZE%" NEQ "." %COMMAND% "%KEUZE%"

goto :EOF


::________________________________________________________________________
::
            :MENU
::________________________________________________________________________
::

:: "Add" Quit to menu options ..
    set choices=!choices!Q
    set optie!tel!=.
    set /a tel-=1
    for /L %%x in (0,1,%tel%) DO echo [%%x]  !optie%%x!
    echo [Q]  QUIT

    choice /c !choices! /M "Give number or Q to quit"
:: Choice options start at 1; our options start at 0, so offset -1 ..
    set /a NMBR=%ERRORLEVEL% -1
    set KEUZE=!optie%NMBR%!

goto :EOF


::________________________________________________________________________
::
            :SYNTAX
::________________________________________________________________________
::
echo.                                                Version 1.0 by NotNull
echo.
echo.    QCD   [partial foldername]
echo.
echo.    CD to a folder by entering a partial foldername
echo.    If more than one matching folder is found,
echo.    the first 10 are shown to choose from. 
echo.
echo.    Example: QCD m32 to change directory to c:\windows\systeM32
echo.
echo.
echo.    When %%COMMAND%% = pushd (currently: %COMMAND% ) :
echo.    If the folder is a UNC-path, the script will (temporary) map a 
echo.    free drive-letter to access this folder.
echo.    You can use the POPD command to go back to the starting folder
echo.    and remove the temporary drive mapping.
echo.
echo.

NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Useful applications for Everything

Post by NotNull »

NotNull wrote:* A replacement for Explorer's Alt-Enter to calculate the folder size
This adds an Explorer context-menu entry for folders and drives.
It reports the size of the selected drive/folder and all direct files/folderrs in that folder (1 level deep) that have a size >10MB
That size can be configured, of course (set MINSIZE= .....)

Example:
2017-06-06 17_00_10-wfn__C__2INSTALL_  _ _parent__C__2INSTALL__ size__10000000_ - Everything.png
2017-06-06 17_00_10-wfn__C__2INSTALL_ _ _parent__C__2INSTALL__ size__10000000_ - Everything.png (34.1 KiB) Viewed 7366 times

I wrote a little script to do all the stuff, as it was a little tricky to get the syntax right (you need to escape special characters in the registry and after that .. you need to escape other characters AND escape the escaped characters to use it in combination with REG.exe)

* Firts of all you need to index the folder size in Everything (Options > Indexes > Index folder size) ...
* After that, put the script in the folder where your Everyhing.exe is (that's important; it gets the path to Everything from that..
* When you start the script, you get the option to either install or remove the context menu.

That's it. After running the script, there will be an extra context menu entry. It's name is the same as the name of the script.
If you like the menu-entry to be called "Everything is awesome!" (http://www.imdb.com/title/tt1490017/ ; try *not* to sing :-) ), just rename the script to "Everything is awesome!.cmd"

Nice side-effect is that you can "zoom in": when you see a "big folder" in the Everything pane, just right click and choose "Folder Size" (or: "Everything is awesome!") and now *that* folder will be reported .. There is no "zoom out", btw.

There is one thing, though: the sorting of the list. First come the files (sorted by size) and then the folders (also sorted by size). Still have no idea why the list gets sorted like this. Probably because I'm very inexperienced regarding Everything (that's a fact) or just plain stupid :-)
Will update the script when that has been resolved. The sorting, that is; not my stupidity, that's probably incurable ...



FOLDER SIZE.CMD

Code: Select all


@echo off
setlocal

:: Minimum size of files and folders to report (in bytes)
    set MINSIZE=10000000

    
    echo.
    echo.   Install or remove Explorer "%~n0" context menu for drives and folders
    echo.   The context menu entry will have the same name as this script (%~n0)
    echo.
    echo.   [ 1 ]  Install
    echo.   [ 2 ]  Remove
    echo.   [ Q ] QUIT
    echo.
    choice /C 12Q /M "Make a choice ..." 
    call :CHOICE%ERRORLEVEL%

goto :EOF


:CHOICE1 :: INSTALL
    reg add "HKCU\Software\Classes\Directory\shell\%~n0\command" /ve /d "\"%CD%\everything.exe\" /sort size -search \"wfn:\"\"\"%%V\"\"\"  ^| ^<parent:\"\"\"%%V\\\"\"\" size:^>%MINSIZE%^>" /F
    reg add      "HKCU\Software\Classes\Drive\shell\%~n0\command" /ve /d "\"%CD%\everything.exe\" /sort size -search \"^<parent:\"\"\"%%V\"\"\" size:^>%MINSIZE%^>" /F
goto :EOF

:CHOICE2  ::REMOVE
    reg DELETE "HKCU\Software\Classes\Directory\shell\%~n0" /F
    reg DELETE       "HKCU\Software\Classes\Drive\shell\%~n0" /F
goto :EOF


:CHOICE3  ::QUIT
goto :EOF

Post Reply