0

I am trying to build file manager tools for window PC, I already build tools for drives (c:, d:, e: ..) where I can delete, edit files and folders.

My problem is, I am trying to do the same thing (edit, delete) for shared files and folders. This files and folders are already shared in the private network where we can use "Network" to manipulate files and folder manually (image). I already did copy, delete, rename of files and folder using System.IO. But I cannot able to list those UNC name and search directory, files.

enter image description here

Fig. Pic of my "Network" shared & also in this pic "DESKTOP-xxx" is other PC and other one is local PC.

Question:

  • Is there any library/example code that can do List Devices/Machine Name?
  • Is there any library/example code that can search or directory/file list in specific path?

If I get the path I can easily manipulate the file using System.IO.

What have I done?

If somebody knows how to list and manipulate shared files programmatically which is available in the network please share any information. Anything would be great help.

Thank you in advance.

Zmuffin
  • 41
  • 1
  • 6
  • Does this answer your question? [Accessing a network file share with C#](https://stackoverflow.com/questions/18240909/accessing-a-network-file-share-with-c-sharp) – Özgür Güzeldereli Oct 18 '22 at 18:28
  • Actually no mate. I want the list of machine name that are shared in the network and able to search files/folder in that specific UNC path. – Zmuffin Oct 18 '22 at 18:33
  • Does this answer your question? https://stackoverflow.com/questions/3567063/get-a-list-of-all-unc-shared-folders-on-a-local-network-server I am guessing you already looked at this but you can never be sure. – Özgür Güzeldereli Oct 18 '22 at 18:34
  • Yes mate, I already looked into that; got an error of "The RPC server is unavailable" when using "\root\cimv2". If I removed it and only use machine name shows local pc shared files/folders even though it is other pc. – Zmuffin Oct 18 '22 at 18:43
  • Is it possible that RPC server is unavailable? – Özgür Güzeldereli Oct 18 '22 at 18:44
  • In both PC RPC service is running properly, I double checked it. – Zmuffin Oct 18 '22 at 18:48

0 Answers0