RFE: Paste stem:<list>
RFE: Paste stem:<list>
RFE: Paste stem:<list>
Or is there a method to do so already?
so (a Paste of):
red.jpg
blue.txt
gives:
red|blue
How would you do that with a keyboard?
Ctrl+Shift+INS? That would be mighty awkward?
Alt+INS would work.
Or is there a method to do so already?
so (a Paste of):
red.jpg
blue.txt
gives:
red|blue
How would you do that with a keyboard?
Ctrl+Shift+INS? That would be mighty awkward?
Alt+INS would work.
Re: RFE: Paste stem:<list>
Currently, I don't have an option to do this.
The next alpha update will have a bookmark option to do this.
For example:
/replace-sel stem:<<trim:<regexreplace:clipboard:,"(?m)^(.*)\.[^\.]*$","$1|">,"|">>
(replaces each line with the stem + | and trims the final |)
I will also consider a stemfilelist1: search option.
I will also consider a stem:remove-extension:<red.jpg|blue.txt> search option.
The next alpha update will have a bookmark option to do this.
For example:
/replace-sel stem:<<trim:<regexreplace:clipboard:,"(?m)^(.*)\.[^\.]*$","$1|">,"|">>
(replaces each line with the stem + | and trims the final |)
I will also consider a stemfilelist1: search option.
I will also consider a stem:remove-extension:<red.jpg|blue.txt> search option.
Re: RFE: Paste stem:<list>
Everything 1.5.0.1360a fixes an issue with regexreplace not working with multiple lines.
To create a bookmark to paste the stems of filenames from the clipboard:
edit: old code:
(incorrectly matches newlines with [^\.])
I'm still working on adding stemfilelist1:
To create a bookmark to paste the stems of filenames from the clipboard:
- In Everything 1.5, from the Bookmarks menu, click Add to bookmarks.
- Change the Name to: Paste Stem
- Change the Search to:
Code: Select all
/replace-sel stem:<<trim:<regexreplace:clipboard:,"(?m)^(?:.*\\)?(?:([^\\\r\n]*)\.[^\\\r\n\.]*|([^\\\r\n\.]*))\r?$","$1$2|">,"|">>
- Optionally set a keyboard shortcut.
- Click OK.
edit: old code:
Code: Select all
/replace-sel stem: <<trim:<regexreplace:clipboard:,"(?m)^(.*)\.[^\.]*$","$1|">,"|">>
I'm still working on adding stemfilelist1:
Re: RFE: Paste stem:<list>
Thank you!
I have inserted a space after stem: ...
I have inserted a space after stem: ...
Code: Select all
/replace-sel stem: <<trim:<regexreplace:clipboard:,"(?m)^(.*)\.[^\.]*$","$1|">,"|">>
Re: RFE: Paste stem:<list>
I have encountered a problem with a total path length greater than 259 characters.
Copy path and file name to clipboard
Presentation in short form
aaa.docx
bbb.docx
üöäÜÖÄߧ&.txt
Execute bookmark
Presentation in short form
stem: <aaa|bbb|üöäÜÖÄߧ&>
Result (without warning that not all files were taken into account)
Presentation in short form
üöäÜÖÄߧ&.txt
aaa.docx and bbb.docx missing.
Please check.
Thank you.
_________________________________________________________________________________
Everything 1.5.0.1360a (x64) | Windows 11 Pro (x64) Version 23H2 (OS build Build 22631.2715)
Registry:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
DWORD-Value (32-Bit) ...
LongPathsEnabled | Value: 1 | Basis: Hexadecimal
Copy path and file name to clipboard
Code: Select all
D:\259 Zeichen\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\aaa.docx
D:\259 Zeichen\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\bbb.docx
D:\259 Zeichen\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\üöäÜÖÄߧ&.txt
aaa.docx
bbb.docx
üöäÜÖÄߧ&.txt
Execute bookmark
Code: Select all
stem: <D:\259 Zeichen\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\aaa|D:\259 Zeichen\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\bbb|D:\259 Zeichen\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\üöäÜÖÄߧ&>
stem: <aaa|bbb|üöäÜÖÄߧ&>
Result (without warning that not all files were taken into account)
Code: Select all
D:\259 Zeichen\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\TC32-64USB\Migration\_Forumsanfragen\Ansichtsmodus_ViewMode\Ansichtsmodus-Rückstellung-auf-Vorgabe_50-50pct\üöäÜÖÄߧ&.txt
üöäÜÖÄߧ&.txt
aaa.docx and bbb.docx missing.
Please check.
Thank you.
_________________________________________________________________________________
Everything 1.5.0.1360a (x64) | Windows 11 Pro (x64) Version 23H2 (OS build Build 22631.2715)
Registry:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
DWORD-Value (32-Bit) ...
LongPathsEnabled | Value: 1 | Basis: Hexadecimal
Re: RFE: Paste stem:<list>
Thank you testing tuska,
Why add a space after stem:?
The intention here was to search for stems matching the stems from the full name from the clipboard.
I'm seeing the expected results my end: aaa.docx and bbb.docx are found.
Do you have any search options enabled under the Search menu?
The regex could be improved because [^\.] matches newlines...
Please try the following bookmark search:
edit: old code:
Why add a space after stem:?
The intention here was to search for stems matching the stems from the full name from the clipboard.
I'm seeing the expected results my end: aaa.docx and bbb.docx are found.
Do you have any search options enabled under the Search menu?
The regex could be improved because [^\.] matches newlines...
Please try the following bookmark search:
Code: Select all
/replace-sel stem:<<trim:<regexreplace:clipboard:,"(?m)^(?:.*\\)?(?:([^\\\r\n]*)\.[^\\\r\n\.]*|([^\\\r\n\.]*))\r?$","$1$2|">,"|">>
Code: Select all
/replace-sel stem:<<trim:<regexreplace:clipboard:,"(?m)^(?:.*\\)?([^\\\n]*)\.[^\\\.\n]*$","$1|">,"|">>
(doesn't work for filenames without an extension)
Re: RFE: Paste stem:<list>
I get no result without a space after stem:.
Bookmark: "Search: Custom"
Code: Select all
/replace-sel stem:<<trim:<regexreplace:clipboard:,"(?m)^(.*)\.[^\.]*$","$1|">,"|">>
The following is interesting for me: CRLF
If I copy the result (with space after stem:) from the Everything search box into the Text editor...
(EmEditor Pro v23.0.1 (64-bit) - No Wrap (Ctrl+1))
Code: Select all
stem: <C:\totalcmd\wincmd| *)
C:\totalcmd\wincmd_Buttonbar>
U+000D U+000A
UTF-16LE: 0x000D 0x000A
CARRIAGE RETURN (CR); LINE FEED (LF)
Unicode Script: Zyyy (Common): Zyyy (Common)
Unicode General Category: Cc (Control): Cc (Control)
Normally, after a copy action, each content of the Everything search line is transferred 1:1 to the text editor, i.e. in one line.
No, only Everything is selected.
Here I get this result in the search box of Everything:
Code: Select all
stem: <clipboard[b][/b]:>
Result as before:
Code: Select all
stem:<clipboard[b][/b]:>
Re: RFE: Paste stem:<list>
2void
I tested your suggestions again.
(I think there must have been an additional problem with the clipboard in a previous test).
With this code, only the file "üöäÜÖÄߧ&.txt" is displayed, but not the files "aaa.docx", "bbb.docx" -> Total path >259 characters.
Workaround: After executing the bookmark (CODE below!...), set the path BEFORE the code: Path\ stem:<aaa|bbb|üöäÜÖÖߧ&>
With this code, the files "aaa.docx", "bbb.docx" and "üöäÜÖÄߧ&.txt" are also displayed -> Total path >259 characters.
This code - bookmark: "Paste Stem" only works (in the active path) for me with a space after stem: - as already mentioned above:
(The following code for the bookmark differs slightly from the code (also for a bookmark) at the beginning of this post).
Thank you for your efforts!
I tested your suggestions again.
(I think there must have been an additional problem with the clipboard in a previous test).
This code works (in the active path) because it has a space after stem:void wrote: ↑Fri Nov 17, 2023 3:34 am Please try the following bookmark search:Code: Select all
/replace-sel stem: <<trim:<regexreplace:clipboard:,"(?m)^(.*)\.[^\.\n]*$","$1|">,"|">>
With this code, only the file "üöäÜÖÄߧ&.txt" is displayed, but not the files "aaa.docx", "bbb.docx" -> Total path >259 characters.
Workaround: After executing the bookmark (CODE below!...), set the path BEFORE the code: Path\ stem:<aaa|bbb|üöäÜÖÖߧ&>
This code works (in all paths) for me with and without a space after stem:void wrote: ↑Fri Nov 17, 2023 3:34 am If you want to strip the path part too, please try:Code: Select all
/replace-sel stem:<<trim:<regexreplace:clipboard:,"(?m)^(?:.*\\)?([^\\\n]*)\.[^\\\.\n]*$","$1|">,"|">>
With this code, the files "aaa.docx", "bbb.docx" and "üöäÜÖÄߧ&.txt" are also displayed -> Total path >259 characters.
This code - bookmark: "Paste Stem" only works (in the active path) for me with a space after stem: - as already mentioned above:
(The following code for the bookmark differs slightly from the code (also for a bookmark) at the beginning of this post).
Code: Select all
/replace-sel stem: <<trim:<regexreplace:clipboard:,"(?m)^(.*)\.[^\.]*$","$1|">,"|">>
Re: RFE: Paste stem:<list>
Thank you for testing the regexreplace tuska,
I found the following to work rather well:
This one will strip the starting path part, remove the extension if it exists and do nothing if the text is already a stem.
It was a pain to match this, capture it and skip the trailing \r
(?m) = multiline mode
^ = start of line
(?:.*\\)? = don't capture and skip till the last \ (if it exists)
(?: ... ) = don't capture and specify the OR group
([^\\\r\n]*) = capture stem part to $1
\.[^\\\r\n\.]* = match extension
| = OR
([^\\\r\n\.]*) = capture text that is already a stem to $2
\r?$ = match \r (if it exists) and match the end of the line
stemfilename1: will make this soo much easier..
I found the following to work rather well:
Code: Select all
/replace-sel stem:<<trim:<regexreplace:clipboard:,"(?m)^(?:.*\\)?(?:([^\\\r\n]*)\.[^\\\r\n\.]*|([^\\\r\n\.]*))\r?$","$1$2|">,"|">>
It was a pain to match this, capture it and skip the trailing \r
(?m) = multiline mode
^ = start of line
(?:.*\\)? = don't capture and skip till the last \ (if it exists)
(?: ... ) = don't capture and specify the OR group
([^\\\r\n]*) = capture stem part to $1
\.[^\\\r\n\.]* = match extension
| = OR
([^\\\r\n\.]*) = capture text that is already a stem to $2
\r?$ = match \r (if it exists) and match the end of the line
stemfilename1: will make this soo much easier..
Re: RFE: Paste stem:<list>
2void
Thank you for your effort and the new code!
With this I get much more results (on the topic: "in all paths").
Thank you for your effort and the new code!
With this I get much more results (on the topic: "in all paths").
Code: Select all
New code: 1 152 items (655 files, 497 folders)
Old code: 436 items (424 files, 12 folders)
Re: RFE: Paste stem:<list>
Everything 1.5.0.1361a adds more values to the paste_multiline_type advanced setting.
You can now pick between name and stem.
To paste the name part of multiple lines of filename text:
To paste the stem part of multiple lines of filename text:
Everything 1.5.0.1361a also adds a /search_edit_paste search command.
To create a bookmark (with an optional keyboard shortcut) to paste the name part of multiple lines of text:
To create a bookmark (with an optional keyboard shortcut) to paste the stem part of multiple lines of text:
Everything 1.5.0.1361a also adds name-filelist1: and stem-filelist1: search function.
To match the name part only, include the following in your search:
name-filelist1:
Hold down Ctrl and click the name-filelist1: text in your search box.
Paste your multiple lines of filename text into the file list slot.
Click OK.
To match the stem part only, include the following in your search:
stem-filelist1:
Hold down Ctrl and click the stem-filelist1: text in your search box.
Paste your multiple lines of filename text into the file list slot.
Click OK.
File List Slots
You can now pick between name and stem.
To paste the name part of multiple lines of filename text:
- In Everything 1.5, from the Tools menu, click Options.
- Click the Advanced tab on the left.
- To the right of Show settings containing, search for:
paste - Select paste_multiline_type.
- Set the value to: Name
- Click OK.
To paste the stem part of multiple lines of filename text:
- In Everything 1.5, from the Tools menu, click Options.
- Click the Advanced tab on the left.
- To the right of Show settings containing, search for:
paste - Select paste_multiline_type.
- Set the value to: Stem
- Click OK.
Everything 1.5.0.1361a also adds a /search_edit_paste search command.
To create a bookmark (with an optional keyboard shortcut) to paste the name part of multiple lines of text:
- In Everything 1.5, from the Bookmarks menu, click Add to bookmarks.....
- Change the Name to: Paste Names
- Change the Search to: /search_edit_paste 0 1 2
- Optionally set a keyboard shortcut.
- Click OK.
To create a bookmark (with an optional keyboard shortcut) to paste the stem part of multiple lines of text:
- In Everything 1.5, from the Bookmarks menu, click Add to bookmarks.....
- Change the Name to: Paste Stems
- Change the Search to: /search_edit_paste 0 1 3
- Optionally set a keyboard shortcut.
- Click OK.
Everything 1.5.0.1361a also adds name-filelist1: and stem-filelist1: search function.
To match the name part only, include the following in your search:
name-filelist1:
Hold down Ctrl and click the name-filelist1: text in your search box.
Paste your multiple lines of filename text into the file list slot.
Click OK.
To match the stem part only, include the following in your search:
stem-filelist1:
Hold down Ctrl and click the stem-filelist1: text in your search box.
Paste your multiple lines of filename text into the file list slot.
Click OK.
File List Slots
Re: RFE: Paste stem:<list>
paste_multiline_type -> Stem
This has been working out nicely, thanks .