Page 1 of 1

User Menu - CALL Command: $(ListOfSelectedNames)

Posted: 18 Sep 2023, 20:16
by therube
User Menu - CALL Command: $(ListOfSelectedNames) & ^ character


Just to point out...


User Menu ->
Command: ECHO && PAUSE
Arguments: $(ListOfSelectedNames)

listofselectedname = 123456, 123^456, 123^^456

Shell:
C:\>call ECHO && PAUSE 123456 123456 123^456
ECHO is on.
Press any key to continue . . .
^ is an ESC character to CMD.
As it is, file names that include a ^ character are not correctly escaped, so not correctly sent to the target program (Command:).

I suppose if Everything iterated over $(ListOfSelectedNames) s/^/^^/g kind of thing might work (s/\^/\^\^/g, actually, as you have to ESC the ^'s [in Vim] ;-))?
(Something like that would have to happen before the CALL is initiated, such that the CALL would then have a list that it would then parse, correctly.)


Expected output:
C:\>call ECHO && PAUSE 123456 123^456 123^^456
ECHO is on.
Press any key to continue . . .

Escape Character

^ Escape character.

Adding the escape character before a command symbol allows it to be treated as ordinary text. These characters which normally have a special meaning can be escaped and then treated like regular characters : & \ < > ^ |

e.g. Echo THIS ^& THAT
Echo Heading1 ^| heading2 ^| heading3
Echo The Escape character looks like this ^^
https://ss64.com/nt/syntax-esc.html#delimiters

Re: User Menu - CALL Command: $(ListOfSelectedNames)

Posted: 18 Sep 2023, 20:33
by therube
And that said, heh...

If you uncheck, the 'Execute through shell' option, that might suffice for a GUI program.

Command: "C:\DEV\Locate\Everything.exe"
Arguments: -rename $(ListOfSelectedNames)
(in order to rename said file names)

Command: "C:\DEV\Locate\Everything.exe"
Arguments: $(ListOfSelectedNames)
(in order to search for said file names)