0

I am trying to provide functionality to an application to show files in the Windows Explorer search screen that contain order numbers. I can make this work on a local drive but can not get it to work on a network drive. To find a file with 11837 in it's name on the local drive I use

Shell(explorer.exe "search-ms://query=filename:*11837* folder:I:\Access Work\Public\")

To test on a network drive I use:

Shell(explorer.exe "search-ms://query=filename:*11837* folder:\\WIN-S33HCF5D2R7\Users\Public\)

The first search brings up the Explorer search window with the files with the search string in their name. The second search using the network path does not find the files at that location. I really can't find any documentation on command parameters or required structure for Explorer.exe so am trying this forum.

Any insight that can be provided will be much appreciated. I have spent way too much time on this.

Thank you in advance.

DougM
  • 109
  • 3
  • 16
  • Just an off-the-wall thought that may help you get to the bottom of this... maybe try making a `SUBST` of the network folder and searching that to see if *anything* works across the network stack. – Mark Setchell Mar 11 '15 at 23:19
  • Unlike hard disk drives, network drives must be [mapped](https://msdn.microsoft.com/en-us/library/8kst88h6(v=vs.84).aspx) requiring user name and password credentials. Here is also a related SO question using the [FSO object](http://stackoverflow.com/questions/631401/access-network-share-from-within-vbscript-eg-filesystemobject/631540#631540) instead of explore.exe shell. – Parfait Mar 11 '15 at 23:25
  • Is the indexing service running on the server? – Raymond Chen Mar 11 '15 at 23:43
  • Thank you all for your comments. Mark, the query seems to go to the designated folder but the file search isn't activated. If I put the search string into the search box the files show up in the designated directory immediately. Parfait, I'll try to add drive mapping and see if this helps. As your comment seems to imply possibly the application does not have permission on the network drive. Permissions and networks are definitely not my strong suit – DougM Mar 12 '15 at 02:01

0 Answers0