mgutt Posted August 8, 2021 Share Posted August 8, 2021 Indexed Searching on network shares works only if: The share is provided by a Windows Server which has the Windows Search Service installed A third party explorer / index tool is used The implementation of the Windows Search Protocol in Linux' Samba is still in development: https://lists.samba.org/archive/samba/2020-April/229273.html Last Statement I found https://github.com/noelpower/samba/tree/WSP-WIP-4.11 Project So I came up with this simple windows batch script, which syncs locally the target share by creating softlinks (which allows only indexed searching for filenames and not size or content): SET target="C:\Users\<your_username>\unraid\sharename" SET source="\\tower\sharename" PushD %source% &&( forfiles -s -c "cmd /c IF @isdir==TRUE mkdir ""%target%""\@relpath" forfiles -s -c "cmd /c IF @isdir==FALSE mklink ""%target%""\@relpath ""%source%""\@relpath" ) & PopD Simply paste it into a file like softsync.bat and execute it as admin. Source (network share): Target (local): Search result: Note: Its a one-way sync. This means if files are deleted on the network share the symlink still exists. You could delete the local folder content at the beginning of the script, if you like to cover deleted files as well. Sources: https://superuser.com/a/210957/129262 https://superuser.com/a/333863/129262 https://stackoverflow.com/a/8714962/318765 https://docs.microsoft.com/de-de/windows-server/administration/windows-commands/forfiles https://docs.microsoft.com/de-de/windows-server/administration/windows-commands/mklink Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.