locked
How to access the computers connected external hard disk via LAN using c# RRS feed

  • Question

  • My computer connected with external hard disk  via LAN so how can i access that using c# please help me 
    Thursday, April 17, 2014 8:36 AM

Answers

  • Can you put the URL into a window explorer and get results like below?

    \\192.1.2.3\


    jdweng

    • Marked as answer by Barry Wang Monday, April 28, 2014 1:16 AM
    Thursday, April 17, 2014 10:15 AM
  • Hi Sumit.pareek,

    Once you have the right as Joel mentioned to access that folder, you can try something like the following:

    e.g if you want to create a text.txt file

    StreamWriter myWriter = File.CreateText(@"\\10.10.27.35\folder\subfolder\text.txt");

    Regards,



    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Barry Wang Monday, April 28, 2014 1:16 AM
    Tuesday, April 22, 2014 9:49 AM

All replies

  • the external HDD would have been assigned a drive letter, simply ask the end user to "enter" this drive letter along with absolute path to a file / folder (if required) & use this path in your file API calls.

    also look at this API & see if this is going to work for you.

    hope this helps!

    Thursday, April 17, 2014 9:18 AM
  • The hard disk should have an IP address and name.  So you can access either by

    \\192.X.X.X\     or \\diskname\

    Try first using a windows explorer using the above in the URL to verify it works before adding it to your application.


    jdweng

    Thursday, April 17, 2014 9:42 AM
  • First of all thanks jdweng for you reply . 

                 Yes my hard disk has ip address but how can i access my hard disk using ip address please can u tell me 

    Thursday, April 17, 2014 10:13 AM
  • Can you put the URL into a window explorer and get results like below?

    \\192.1.2.3\


    jdweng

    • Marked as answer by Barry Wang Monday, April 28, 2014 1:16 AM
    Thursday, April 17, 2014 10:15 AM
  • Hi Sumit.pareek,

    Once you have the right as Joel mentioned to access that folder, you can try something like the following:

    e.g if you want to create a text.txt file

    StreamWriter myWriter = File.CreateText(@"\\10.10.27.35\folder\subfolder\text.txt");

    Regards,



    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Barry Wang Monday, April 28, 2014 1:16 AM
    Tuesday, April 22, 2014 9:49 AM