How to? %@everything[] question

Dec 7, 2009
238
2
Left Coast, USA
TCC 20.00.14 x64 Windows 10 [Version 6.3.14393]
TCC Build 14 Windows 10 Build 14393


Here's the @everything[] example shown in the v.20 online help:

echo %@everything[tcc.exe,f]

On my system, the above returns three or four "hits." Then this command:

echo %@everything[tcc.exe,f,1]

... returns only a single "hit" — the very first one shown when parameter "1" is not used.

Different kind of results with wildcards, though.

echo %@everything[*8*.tmp,f]

... returns around 85 "hits" to the console. But an attempt to get only one match by using the optional numeric parameter fails:

echo %@everything[*8*.tmp,f,1]

... returns "Echo is OFF".

Shouldn't this last example return the first "hit" that's displayed when the parameter "1" has not been used?


This, however, does work — note that there's an additional character in the file spec:

%@everything[*b8*.tmp,f,1]

It returns the fully-qualified name of a single file on this system matching "*b8*.tmp".

Why did it fail for "*8*.tmp" when both "f" and "1" params were used?
 

rconn

Administrator
Staff member
May 14, 2008
12,365
150
This is an internal Everything bug/feature; there's not anything I can do about it.

The problem is because Everything is returning 1 match (as requested). But when you provide a count, it's ignoring the directory / file specifier, and the first match returned happens to be a directory, not a file. So nothing is displayed.
 
May 20, 2008
11,424
99
Syracuse, NY, USA
The EVERYTHING command exhibits similar behavior, but a well-constructed search string gets around the difficulty.
Code:
h:\work> d w*
2016-08-21  00:17  <DIR>  words
2015-02-08  16:06  393  w32h.btm
2014-09-30  23:37  2,320  w32tmparams.btm
2014-10-01  00:17  1,924  w32tmparams17.btm
2015-08-06  11:50  1,791  w32tmparamsx.btm
2016-06-18  12:26  53  who.txt

h:\work> everything /f /m=1 "h:\Work\w*"

h:\work> everything /m=1 "file: h:\Work\w*"
H:\work\w32h.btm

h:\work>
I can't figure out how to do that with @EVERYTHING.
 

rconn

Administrator
Staff member
May 14, 2008
12,365
150
The /M=n argument in EVERYTHING (or the count arg in @EVERYTHING) is going to be meaningless in almost every case, as it's going to find something in some subdirectory and display that, almost certainly NOT the first file in the current directory that you think it will.
 
Dec 7, 2009
238
2
Left Coast, USA
To try another few examples to see what would and wouldn't work, I ran a few "everything" or "echo %@everything[whatever]" commands only to find it not working again. No results returned in any case.

Thinking back on a thread of a day or so ago I ran "Everything /o", then clicked Apply without changing anything in the dialog, then returned to the command prompt. The Everything commands began working again.

Is this the drill, then — after each reboot, before Everything will work at all, you have to run Everything /o? once?
 
To try another few examples to see what would and wouldn't work, I ran a few "everything" or "echo %@everything[whatever]" commands only to find it not working again. No results returned in any case.

Thinking back on a thread of a day or so ago I ran "Everything /o", then clicked Apply without changing anything in the dialog, then returned to the command prompt. The Everything commands began working again.

Is this the drill, then — after each reboot, before Everything will work at all, you have to run Everything /o? once?
It sounds as if you're not running Everything at startup. Go into Everything's options and select "Run Everything at startup" in the General tab. You should also make sure that "Run as Administrator" is NOT selected to avoid getting a UAC prompt every time you log in.

-- Howard
 
  • Like
Reactions: mikea
Dec 7, 2009
238
2
Left Coast, USA
Good advice. Thanks, Howard.

Another documentation-worthy item for the TC/TCC online help, methinks. I didn't realize that it should be launched on its own at startup.
 
May 20, 2008
11,424
99
Syracuse, NY, USA
I believe it works something like this. In order to monitor file system changes, you need EITHER the Everything service OR an elevated instance. There is no reason for both. If you run the service, TCC cannot communicate with it, so a "client server" (unelevated instance) is also needed.
If you don't run the service, but start an elevated instance of "everything.exe -startup", that's all that's needed. Note that this second mode of operation was not available in older versions of Everything; in particular, it was not available with the Everything.exe from TCv18.

You can avoid the UAC prompt with a scheduled task: "[path\]everything.exe -startup" ... run with highest privileges ... triggered by your logon. I just tested that on Windows 7.
 
Dec 7, 2009
238
2
Left Coast, USA
For starters I took the simple way out: run Everything /o and select the start-with-Windows option. That also seems to have selected starting the service and running as administrator. During the next boot, when the UAC dialog appeared for Everything, it didn't display Everything's name in the dialog box, but TCC 20's name. (This is under Win 10, if it matters.)
 
May 20, 2008
11,424
99
Syracuse, NY, USA
In my last post, I pasted the URL, selected that text, then clicked link and pasted the URL again. Why do I see "[title]" and not the text I pasted?
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Another @EVERYTHING question Support 4
A Installers delete EVerything service if already installed Support 0
thorntonpg What is the latest version of everything Support 1
D What does the file "..\Everything\Run history.csv" store? Support 5
C Control Everything CPU usage at startup? Support 7
C v23 Everything still referenced after removing v23 and installing v24 Support 7
CWBillow Everything.exe - 64-bit? Support 8
C How to make list of drive contents when shutdown PC / Everything.exe Support 7
D Range command dialog with blank maximum size erases everything Support 5
B Everything version in Take Command build 39? Support 3
nikbackm Everything - TCC command vs native dialog Support 2
K Everything installation Support 1
R How Do I Get Rid of 'Everything' Support 16
C Del /W999 2gbFile.ext / latest build / Win7 x64 / MSE / Everything Support 5
F How to? Everything Support 1
M I dont get "Everything" :-S Support 14
w_krieger v.exe and everything.exe Support 5
C everything.exe .vs. new installs Support 4
Alpengreis [v2problems0.x] After Update always "" with Everything Support 4
D everything /o does not open the option dialog Support 4
mikea Documentation Consider expanding the docs for 'Everything' a bit Support 10
C How to? handle the UAC prompt on computer restarts with Everything Support 3
Jesse Heines How to? Everything Tool Not Working After Version 20 Installation Support 8
Fross V20b8 Everything Issue Support 5
Joe Caverly Everything Dialog Support 7
Alpengreis Small things to change in installer and after installed Everything Support 0
C Everything Everyting.db.tmp Support 0
H New Install; Everything setup issues Support 9
D CD doesn't always find everything Support 8
R How to? use @everything perl regex Support 2
CWBillow Everything as a service Support 2
T Everything install forced (sometimes) Support 2
fromano How to? Everything finding directories with 2 or more files in them Support 3
epement Using "everything" Support 10
V Everything broke … everything Support 3
K_Meinhard Documentation @everything Support 2
R Everything /o not launching Preferences dialogue Support 5
R Everything service locking thumb drives Support 1
vefatica v18: EVERYTHING /S Support 1
samintz DO /p and EVERYTHING Support 2
H FuzzyCD: JPSTREE vs. Everything Search Support 1
C Documentation webhelp "What's New - Version 15" - EVERYTHING Support 0
Jay Sage Using EVERYTHING Command in TCMD15 Support 5
C forum Posting Question... Support 3
C question re: Move Support 3
S How to? Upgrade Question: What supporting documentation is required at time of purchase? Support 2
Peter Murschall Documentation Question to %@PSHELL Support 4
Fross Tab Question Support 6
Fross Quick Function Question Support 17
Dick Johnson Question about the Touch command Support 0

Similar threads