Everything command line output to text editor

General discussion related to "Everything".
Post Reply
rando
Posts: 51
Joined: Fri Jul 31, 2009 3:23 pm

Everything command line output to text editor

Post by rando »

I'm using the Vim text editor.

In Vim I can use "ls" or "find" to list the file names output in my text editor.

p.e.
:r !ls d:\*.jpg will list the names of all .jpg files in my text editor.

Is it possible to do this also with everything/ everything command line?
therube
Posts: 5003
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything command line output to text editor

Post by therube »

9701.TXT:

Code: Select all

E(s16.66H

Gvim 9701.TXT:

Code: Select all

:.!es ncmain.exe

9701.TXT:

Code: Select all

C:\out\out-FAV\TAR-_45-0fav2\windows\favorites\Imported bookmarks\Google Search_ ncmain.exe.url
E:\Documents and Settings\RUBEN\Favorites\Imported bookmarks\Google Search_ ncmain.exe.url
C:\Local\SANDBOX\CLEAN-0417\drive\C\NC\NCMAIN.EXE
C:\Local\SANDBOX\CLEAN-BASIS VPRO5\drive\C\NC\NCMAIN.EXE
C:\NC\NCMAIN.EXE
C:\TMP\SEA\seaI\nc\NCMAIN.EXE
C:\TMP\TT2015\BIN.ZIP\X\14\NCMAIN.EXE
C:\WLIB\NC55\NCMAIN.EXE
L:\XFER\NORTON\NC5\MINIMAL\NCMAIN.EXE
O:\OLD.LIB\NORTON\NC55\nc55_expanded\NCMAIN.EXE
O:\OLD.LIB\NORTON\NC55\nc55_expanded\SAFE\NCMAIN.EXE
O:\OLD.LIB\NORTON\NC5\MINIMAL\NCMAIN.EXE
O:\OLD.LIB\ZOTHER\BINS\NCS3\NCMAIN.EXE
O:\OLD.LIB\ZOTHER\BINS\NCS4\NCMAIN.EXE
O:\TMPS\ncmain.exe
W:\_FAITH\TMP\NC\NCMAIN.EXE
X:\C_COPY\NC\NCMAIN.EXE
X:\C_COPY\WLIB\NC55\NCMAIN.EXE
C:\TMP\TT2015\BIN.ZIP\X\NCMAIN.EXE.7z
O:\TMPS\NCMAIN.EXE.not

So, yes, it works just fine.
es.exe needs to be in your PATH.

I don't use the, r !es ncmain.exe, construct, but that works just as fine.
rando
Posts: 51
Joined: Fri Jul 31, 2009 3:23 pm

Re: Everything command line output to text editor

Post by rando »

Great! Thank you.
I forgot to put `es` in the path.

The everything file listing is much much better than `ls`.
rando
Posts: 51
Joined: Fri Jul 31, 2009 3:23 pm

Re: Everything command line output to text editor

Post by rando »

All filenames imported in my text editor don't have accents (éèàìù etc).
I tried to resolve it adding ascii/noascii/utf8:

Code: Select all

!es *.txt -name  ascii:
!es *.txt -name  noascii:
!es *.txt -name  utf8:
Still no accents.
My filenames are encoded latin1.

Did you have the same problem?

If not, can you please tell me if you've indicated a shell setting in .vimrc?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Everything command line output to text editor

Post by NotNull »

As ES.exe is a console application, it is limited by the codepage that was set.
You could try opening a CMD box, check the current codepage (command chcp) and set it to Latin1 (command: chcp 1251 1252 iirc).
Now when you run your ES query, it should show the right accents (depends on your font setting too.

A far easier way is to use the -export-txt <filename> option. That would export the results in UTF8. I guess your editor can handle that as it's quite universal.
Example: es.exe *.txt -export-txt c:\temp\results.txt

EDIT: I remembered the codepage correctly (1252) but mistyped it. Now fixed
.
rando
Posts: 51
Joined: Fri Jul 31, 2009 3:23 pm

Re: Everything command line output to text editor

Post by rando »

Thank you for your comment.

I checked it in cmd.exe
Everything is fine.

I think it has to do with my shell settings in VIM.

These are my settings in Vim:

Code: Select all

set shell=cmd.exe
set shellcmdflag=/c
set shellxquote=""
set shellquote=
I don't know what could be wrong. I'm not an expert in shell processing.

ps: I have been using Everything for many years and I would like to thank you for all the work you've done.
The latest version is really impressive. Thank you.
Post Reply