Did wildcards_star_all (or something else) break EGOR?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Did wildcards_star_all (or something else) break EGOR?

Post by therube »

Did wildcards_star_all (or something else) break EGOR?

What happens now, at home, is that
EGOR.BAT ego*
(does something) but does not return expected results.
Like here, working, I get:
C:\BIN>START C:\DEV\Locate\Everything.exe -rename C:\BIN\ego**

But at home, I was only getting a directory name & not expected files?


EGOR.BAT:

Code: Select all

:: EGO_R_15.BAT (Everything Go _ RENAME) - 1.5 beta version
:: From a command prompt, open an Everything RENAME window, with the files in the current directory, or an (optional) search term:
:: SjB 12/01/2021

:: ... there are quirks here... will have to see how it plays out...

SET DIR=C:\DEV\Locate\15.1300

:: cd %cd%
:: pwd
:: echo ----
:: echo %1
:: echo ----
:: echo %*
:: echo ----

:: pause


if [%1]==[] goto renameall:

START  %dir%\Everything.exe  -rename  %cd%\%**

:: having the second **, adds a "physical" * to the list
:: so 'egor a', will find a, ab, abc
:: without that, 'egor a', would only find a
:: IOW, by including the second * here, you don't have to put that in at the command line
:: so 'egor a', meaning a*, rather then having to enter 'egor a*'

:: thinking i'm going to revert that & if you're forced to manually type a *, so be it...


goto end:


:renameall
START  %dir%\Everything.exe  -rename  %cd%\*


:end
SET DIR=
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by NotNull »

It looks to me as if you need to specify separate filenames with -rename (according to the docs) so * will not be expanded by Everything.


- goto end: should really be goto :end (note the position of the ":").
- Better use the (undocumented) %__CD__% instead of %CD% as that always puts a "\" at the end. %CD% varies (try it in C:\Windows and C:\).
CMD has no problems with c:\folder\\file; Everything 1.4 does (1.5 is OK with it).



This should work regardless :

EGOR.cmd

Code: Select all

@echo  off & setlocal enabledelayedexpansion

SET DIR=C:\DEV\Locate\15.1300

::	Add Folders to list
	rem for /D %%X in (%1*) Do set FILELIST=!FILELIST! "%%~fX"

::	Add Files to list
	for %%X in (%1*) Do set FILELIST=!FILELIST! "%%~fX"

::	Go!
	START  "" "%dir%\Everything.exe"  -rename  %FILELIST%


Some notes:
- will feed only filenames to the rename dialog; if you want folders too: remove the REM statement.
- will work with egor without parms (feeds all files in this folder) and egor A (feeds all filenames that start with A)
- max 8192 chars for filenames (including path); Windows limitation.
- everything.exe or everything64.exe? Version 1.4 or 1.5?
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by void »

Was there a -rename instance already open? -If so, Everything -rename will add to the existing instance.

Wildcards are supported with -rename
I've updated the documentation.
This was only recently added.


-rename is unaffected by wildcards_star_all.


Please send a screenshot to support@voidtools if the issue persists.



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

Re: Did wildcards_star_all (or something else) break EGOR?

Post by NotNull »

Then this should work too (on a recent 1.5 installation):

Code: Select all

@echo  off & setlocal 

  SET "DIR=C:\DEV\Locate\15.1300"
  START  "" "%dir%\Everything.exe"  -rename  "%**"
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by void »

Then this should work too (on a recent 1.5 installation):
Does this work for you?
I am having trouble producing the issue.


Is this a ** issue?
Does
EGOR.BAT ego
give the correct results?
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by NotNull »

Is this question directed at @therube or at me?
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Did wildcards_star_all (or something else) break EGOR?

Post by raccoon »

I didn't notice until now that therube and NotNull are different people. :)
I just see that green guy.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by NotNull »

raccoon wrote: Wed Feb 09, 2022 4:08 pm that green guy.
Don't make us angry; we will avenge ;)
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by void »

Then this should work too (on a recent 1.5 installation):

Code: Select all

@echo off & setlocal

SET "DIR=C:\DEV\Locate\15.1300"
START "" "%dir%\Everything.exe" -rename "%**"
@NotNull, does this work for you?

I read:
Then this should work too
as this is not working for you.


Like here, working, I get:
C:\BIN>START C:\DEV\Locate\Everything.exe -rename C:\BIN\ego**

But at home, I was only getting a directory name & not expected files?
@therube, I have not run into an issue yet from my testing.
Could you please send:
The Everything -rename command line
The results shown in the renamer
The expected results not shown in the renamer.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by NotNull »

Sorry for confusion.
This is working perfectly fine here.

Somehow I wasnt sure if this was about 1.4 or 1,5 (despite being posted in the Everything 1.5 Alpha forum; I miss that from time to time)
My first script would work on 1.4 as well as 1.5.

When it became clear that it was about 1.5 and wildcards could be used as parameter, I wrote a second version and that one should work for @therube too as he is using 1.5.



2022-02-10 09_46_06-Command Prompt.png
2022-02-10 09_46_06-Command Prompt.png (25.98 KiB) Viewed 4648 times
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by therube »

This is me, this time, not the other me.

Anyhow...

It was not working, at home.
I guess I should say, it stopped working, or at least it was not returning expected results.

So last night, I give it a wack, & it is working.
Perhaps it wasn't working at the time that I was running into overall slowness?


So I'll keep my eyes open should it happen again...
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by therube »

But at home, I was only getting a directory name & not expected files?
Some brainiac needs to get quotes around paths that contain spaces ;-).


Worst thing is, it's right there in black & white - if I'd only looked.
(There is a reason I don't always take out the ECHO's or such.)

Code: Select all

C:\USR\STEVEN\P\2P\MIKE.K\ASH 12-31-21>
START  C:\DEV\Locate\Everything.exe  -rename  C:\USR\STEVEN\P\2P\MIKE.K\ASH 12-31-21\22*
(Without needed quotes in the batch file) returns the directory part (up to whitespace), "ASH" of "ASH 12-31-21", not file names beginning with 22.

Code: Select all

:: EGO_R_15.BAT (Everything Go _ RENAME) - 1.5 beta version
:: From a command prompt, open an Everything RENAME window, with the files in the current directory, or an (optional) search term:
:: SjB 12/01/2021

:: ... there are quirks here... will have to see how it plays out...


SET DIR=C:\DEV\Locate

:: cd %cd%
:: pwd
:: echo ----
:: echo %1
:: echo ----
:: echo %*
:: echo ----

:: pause


if [%1]==[] goto renameall:

START  %dir%\Everything.exe  -rename  "%cd%\%**"

:: having the second **, adds a "physical" * to the list
:: so 'egor a', will find a, ab, abc
:: without that, 'egor a', would only find a
:: IOW, by including the second * here, you don't have to put that in at the command line
:: so 'egor a', meaning a*, rather then having to enter 'egor a*'

:: thinking i'm going to revert that & if you're forced to manually type a *, so be it...


goto end:


:renameall
START  %dir%\Everything.exe  -rename  "%cd%\*"


:end
SET DIR=
(I'll deal with end: vs :end, later.)
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Did wildcards_star_all (or something else) break EGOR?

Post by NotNull »

There is more fun to have with double quotes :)

START has a bit of a tricky syntax: if the first thing after the START command is a quoted text, it will be seen as the title of the new window.

So if you ever change START %dir%\Everything.exe -rename "%cd%\%**" to:
START "%dir%\Everything.exe" -rename "%cd%\%**", you got yourself a new head-scratching moment.

To circumvent, add a dummy or empty title:

START "" "%dir%\Everything.exe" -rename "%cd%\%**"

Start /? wrote: Starts a separate window to run a specified program or command.

START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
[command/program] [parameters]
Post Reply