Can the tool 'streams.exe' regard "Scan inside symbolic links" as an optional parameter?
I tried to use the command "streams64.exe -s -d"
or "streams.exe -s -d"
in Administrator access in the user folder "C:\Users\<username>
", However, here is a symbolic link "C:\Users\<username>\Appdata\local\Application Data"
, It is linked to its parent folder "C:\Users\<username>\Appdata\local"
. Then streams.exe stuck into an endless loop and folder displaying "Application Data\Application Data\Application Data\…"
The best way to avoid the problem is not to scan inside symbolic links.
I found that the software NTFSLinksview, which is developed by nirsoft, use the similar strategy to scan files and folders as streams.exe. However, NTFSLinksview has a checkbox "Scan inside symbolic links"
to choose whether to scan the symbolic link's contents or not. when I checked the option, it will stuck into an endless loop, too. However, when the option is unchecked (This is the default setting of NTFSLinksview), It will only scan the symbolic itself and won't jump to the destination folder to scan. This will avoid getting stuck into an endless loop.
I also found that using -Attributes !ReparsePoint
in Windows PowerShell command Get-ChildItem
can bypass scanning inside symbolic links, in avoid getting stuck into an endless loop. The example command can like this:
Get-ChildItem -Force -Attributes !ReparsePoint -Recurse -File -ErrorAction SilentlyContinue | ForEach-Object {
Get-Item -Stream * -Path $_.FullName | Remove-Item
}
I have already run the PowerShell command on my PC, it is relatively safe.
The example is based on this topic: windows - List all files and dirs without recursion with junctions - Super User, You can go to this website to learn more about how to avoid "Scan inside symbolic links"
.
I sincerely hope streams.exe can also regard "Scan inside symbolic links"
as an optional parameter. like adding -s
parameter to enable Recurse subdirectories. Thank you!