Get target files when searching

Discussion related to "Everything" 1.5 Alpha.
Post Reply
err_24546
Posts: 39
Joined: Wed Oct 11, 2023 1:47 am

Get target files when searching

Post by err_24546 »

Hi.
I'm pretty sure this can be done with v1.5. but I'm not sure how.
When I search for

Code: Select all

ext:lnk
, I want to get the actual shortcut targets in the results, instead of the lnk files. Is that possible?
Thanks in advanced.
tuska
Posts: 1046
Joined: Thu Jul 13, 2017 9:14 am

Re: Get target files when searching

Post by tuska »

Hi,

Search query

Code: Select all

                Path\ ext:lnk addcolumn:a a-label:="Shortcut targets" a:=property-system:system.comment: add-column:a:1
Example

Code: Select all

parent:C:\Everything\ ext:lnk addcolumn:a a-label:="Shortcut targets" a:=property-system:system.comment: add-column:a:1
Menu "Help" > Search Syntax > Functions: ... parent:<path> Search for files and folders in the specified path, excluding subfolders.

See also:
.lnk .url - Column & Preview
- "Shortcut Target" column
- "Shortcut Target" and "URL" property
- Copy "Shortcut Target"
- Find broken shortcut files with Everything
How to resolve broken shortcuts?
Add Columns : Shortcut Target variants & a normal path variant
Shortcut Target Size Columns needs adjustments ...

Code: Select all

parent:C:\Everything\ *.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right b:=getproperty($shortcut-target:,"size") a:=formatsize($b:,1) sort:b-descending
 
2024-07-11_Extension_LNK_get target files when searching.png
2024-07-11_Extension_LNK_get target files when searching.png (138.12 KiB) Viewed 1009 times
err_24546
Posts: 39
Joined: Wed Oct 11, 2023 1:47 am

Re: Get target files when searching

Post by err_24546 »

Thanks.
I tried with:

Code: Select all

path:"C:\ProgramData\Microsoft\Windows\Start Menu";"C:\Users\Usuario\AppData\Roaming\Microsoft\Windows\Start Menu"  ext:exe;lnk addcolumn:a a-label:="Shortcut targets" a:=property-system:system.comment: add-column:a:1
This just adds a new column, similar to shortcut-target. I think you missunderstood what I'm trying to do. I don't want to add an extra column.
I want to resolve the lnk files internally to their targets, so I can get only the actual files in the results.

Is that possible?
void
Developer
Posts: 16428
Joined: Fri Oct 16, 2009 11:31 pm

Re: Get target files when searching

Post by void »

Search for the following:

*.lnk addcolumn:shortcut-target

Select all files/folders (Ctrl + A)

From the File menu, under the Copy Property submenu, click Copy Shortcut Target.

Search for:

filelist1:

Hold down Ctrl and click the filelist1: text in the search box.

Paste your filenames and click OK.
therube
Posts: 4879
Joined: Thu Sep 03, 2009 6:48 pm

Re: Get target files when searching

Post by therube »

From the File menu, under the Copy Property submenu, click Copy Shortcut Target
Alternatively, while you're in the results list, & for any results selected, & while focused in the 'Shortcut Target' column,
the right-click context-menu has a (will then have a), 'Copy Shortcut Target' menu item.
void
Developer
Posts: 16428
Joined: Fri Oct 16, 2009 11:31 pm

Re: Get target files when searching

Post by void »

Alternatively, while you're in the results list, & for any results selected, & while focused in the 'Shortcut Target' column,
the right-click context-menu has a (will then have a), 'Copy Shortcut Target' menu item.
Depending on the number of results, this context menu can take minutes to show. (10000+ items)
The File -> Copy Property context menu is instant as it doesn't use any slow shell context menu extensions.
Post Reply