possible to search symbolic links with everything?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

possible to search symbolic links with everything?

Post by klepp0906 »

trying to do some testing/sorting of a big ole robocopy script and i need to know where certain symbolic links reside and whether theyre directories or files.

hoping I can somehow filter everything to show me only those files/folders in a given drive/directory? I've used it to great effect to suss out files with system hidden attributes but google hasnt been kind this morning surrounding symbolic links/junctions.

means i have to inconvenience the professionals :(
void
Developer
Posts: 16908
Joined: Fri Oct 16, 2009 11:31 pm

Re: possible to search symbolic links with everything?

Post by void »

It will be possible with Everything 1.5.

To view reparse targets (files and folders) and hard link targets (files):
  • In Everything 1.5, right click the result list column header and click Add columns....
  • Search for: reparse
  • Select Reparse Target and click OK.
  • right click the result list column header and click Add columns....
  • Search for: hard link
  • Select Hard link Count and Hard Link Filenames and click OK.
Reparse Target (symbolic link/junction) is for files and folders.
Hard link Filename is for files only.

To find files and folders with a reparse target, search for:
reparse-target:

To search for files with 2 or more hard links, search for:
hard-link-count:>=2
Each file will have at least one hard link (itself)
NotNull
Posts: 5468
Joined: Wed May 24, 2017 9:22 pm

Re: possible to search symbolic links with everything?

Post by NotNull »

Code: Select all

attrib:L
Getting these results can be sped up significantly by enabling Index attributes (Options > Indexes)
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

Re: possible to search symbolic links with everything?

Post by klepp0906 »

thank you gentlemen, i am using 1.5a so one or both of the aforementioned solutions ought to have me covered <3
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

Re: possible to search symbolic links with everything?

Post by klepp0906 »

NotNull wrote: Mon Apr 11, 2022 10:22 am

Code: Select all

attrib:L
Getting these results can be sped up significantly by enabling Index attributes (Options > Indexes)
is there an equivalent for directories? i have a folder that has symlinks to other folders and attrib:L doesnt cover it. works a treat for symlink'd files though.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: possible to search symbolic links with everything?

Post by raccoon »

attrib:L is for folders.

Examples of attrib:L folders include

Code: Select all

C:\Documents and Settings
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\ProgramData\Application Data
C:\ProgramData\Desktop
C:\ProgramData\Documents
C:\ProgramData\Favorites
C:\ProgramData\Start Menu
C:\ProgramData\Templates
C:\Users\All Users
C:\Users\Default User
C:\Users\<User>\Application Data
C:\Users\<User>\Cookies
C:\Users\<User>\Local Settings
C:\Users\<User>\My Documents
C:\Users\<User>\NetHood
C:\Users\<User>\PrintHood
C:\Users\<User>\Recent
C:\Users\<User>\SendTo
C:\Users\<User>\Start Menu
C:\Users\<User>\Templates
C:\Users\<User>\AppData\Local\Application Data
C:\Users\<User>\AppData\Local\History
C:\Users\<User>\AppData\Local\Temporary Internet Files
C:\Users\Default\Application Data
C:\Users\Default\Cookies
C:\Users\Default\Local Settings
C:\Users\Default\My Documents
C:\Users\Default\NetHood
C:\Users\Default\PrintHood
C:\Users\Default\Recent
C:\Users\Default\SendTo
C:\Users\Default\Start Menu
C:\Users\Default\Templates
C:\Users\Default\AppData\Local\Application Data
C:\Users\Default\AppData\Local\History
C:\Users\Default\AppData\Local\Temporary Internet Files
C:\Users\Default\Documents\My Music
C:\Users\Default\Documents\My Pictures
C:\Users\Default\Documents\My Videos
C:\Users\Public\Documents\My Music
C:\Users\Public\Documents\My Pictures
C:\Users\Public\Documents\My Videos
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

Re: possible to search symbolic links with everything?

Post by klepp0906 »

huh. wonder why its not picking up any of the symlinked folders ive created. I just tested it on the C drive and youre correct, its picking them up.

however on another drive of mine which has symlink'd folders it does not. any guesses as to why that is? I thought the links might be dead due to migration/moving or some such but tested them and theyre fully functional good symlinks.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: possible to search symbolic links with everything?

Post by raccoon »

Reference: viewtopic.php?f=12&t=10176#attrib
Reference: https://docs.microsoft.com/en-us/window ... -constants

You have to do some study on Reparse Points, Symbolic Links, Hardlinks and Junctions aka Softlinks.

Attrib:L are Reparse Points and you can look at the Reparse-Target: and Reparse-Tag: columns to learn more about them.

If the links you're creating are not of this type, they will not be Attrib:L

My memory is rusty but I recommend reading 5 different websites to learn about the differences. Some are for folders only, some are for files only, some are for files or folders.
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

Re: possible to search symbolic links with everything?

Post by klepp0906 »

thanks for the links, ill definitely have to do some reading. they were all/both (files and folders) created via LSE (link shell extension) via "pick link source" then "drop as symbolic link"

here is the folder
Snag_2f6c915.png
Snag_2f6c915.png (42.84 KiB) Viewed 6561 times
here is the folder in everything which shows them as they are
Snag_2f760d1.png
Snag_2f760d1.png (66.94 KiB) Viewed 6561 times
here is that same folder using attrib:L
Snag_2f7d054.png
Snag_2f7d054.png (7.88 KiB) Viewed 6561 times
GSD
Posts: 30
Joined: Fri Apr 28, 2023 12:59 pm

Re: possible to search symbolic links with everything?

Post by GSD »

NotNull wrote: Mon Apr 11, 2022 10:22 am

Code: Select all

attrib:L
Getting these results can be sped up significantly by enabling Index attributes (Options > Indexes)
Is there any difference between attrib:L and reparse-target: results-wise? Asking because I wold prefer attrib:L precisely because I am indexing attributes.
void
Developer
Posts: 16908
Joined: Fri Oct 16, 2009 11:31 pm

Re: possible to search symbolic links with everything?

Post by void »

For the most part, files and folders that have a reparse target will have the L attribute set.

It is technically possible for a NTFS file to have a reparse target without the L attribute set and a file to have no reparse target with the L attribute set.

Placeholder files also obfuscate some attributes and reparse targets.
GSD
Posts: 30
Joined: Fri Apr 28, 2023 12:59 pm

Re: possible to search symbolic links with everything?

Post by GSD »

void wrote: Fri May 26, 2023 12:04 pm For the most part, files and folders that have a reparse target will have the L attribute set.

It is technically possible for a NTFS file to have a reparse target without the L attribute set and a file to have no reparse target with the L attribute set.

Placeholder files also obfuscate some attributes and reparse targets.
So a comprehensive search that would 100% find all symlinks would be as follows?

Code: Select all

attrib:L | reparse-target: | hard-link-count:>=2
void
Developer
Posts: 16908
Joined: Fri Oct 16, 2009 11:31 pm

Re: possible to search symbolic links with everything?

Post by void »

Yes.
NotNull
Posts: 5468
Joined: Wed May 24, 2017 9:22 pm

Re: possible to search symbolic links with everything?

Post by NotNull »

void wrote: Fri May 26, 2023 12:04 pm t is technically possible for a NTFS file to have a reparse target without the L attribute set
If it is not too much off-topic, do you have an example of that? Thought the owner of the reparse tag had to set the attribute too?
(I know there are sybolic links that map to device space (like C:), but those do not appear in Everything).
void
Developer
Posts: 16908
Joined: Fri Oct 16, 2009 11:31 pm

Re: possible to search symbolic links with everything?

Post by void »

The attributes and reparse tag/target are stored separately on NTFS.

The NTFS driver will likely keep these in sync.



I don't have any good examples of out of sync attributes and reparse targets without writing directly to the NTFS volume.
Post Reply