Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Reading File From Network drive

Reading File From Network drive

Scheduled Pinned Locked Moved C#
questionsysadmin
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lijo Rajan
    wrote on last edited by
    #1

    Hi all, can any one please tell me how can i read from a file which resides in net work drive? Regards Lijo

    D realJSOPR 2 Replies Last reply
    0
    • L Lijo Rajan

      Hi all, can any one please tell me how can i read from a file which resides in net work drive? Regards Lijo

      D Offline
      D Offline
      Dimitri Witkowski
      wrote on last edited by
      #2

      As a usual file (e.g. System.IO.File.ReadAllText(...)) :) Doesn't it work?

      See my article about Windows 7 Taskbar timer here on CodeProject

      L 1 Reply Last reply
      0
      • D Dimitri Witkowski

        As a usual file (e.g. System.IO.File.ReadAllText(...)) :) Doesn't it work?

        See my article about Windows 7 Taskbar timer here on CodeProject

        L Offline
        L Offline
        Lijo Rajan
        wrote on last edited by
        #3

        my file resides in remote system. from that system only i want to read a file. can you please tell me how can i do that? Regards Lijo

        D 2 Replies Last reply
        0
        • L Lijo Rajan

          Hi all, can any one please tell me how can i read from a file which resides in net work drive? Regards Lijo

          realJSOPR Offline
          realJSOPR Offline
          realJSOP
          wrote on last edited by
          #4

          It's the same as when you read a file from your local drive. Why would you think it would be any different?

          .45 ACP - because shooting twice is just silly
          -----
          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
          -----
          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

          1 Reply Last reply
          0
          • L Lijo Rajan

            my file resides in remote system. from that system only i want to read a file. can you please tell me how can i do that? Regards Lijo

            D Offline
            D Offline
            Dimitri Witkowski
            wrote on last edited by
            #5

            This can be done in 3 ways: 1. Map the remote drive (this means, assing e.g. Z: letter to the drive) 2. Read from this location: \\remote-computer\Share\path\file.txt. In this case, the file must be shared in Share folder on the remote computer. 3. If you are running under the credentials of the administrator on the remote computer (this means that two computers are in the same domain), you can read directly from this path: \\remote-computer\C$\path\file.txt.

            See my article about Windows 7 Taskbar timer here on CodeProject

            1 Reply Last reply
            0
            • L Lijo Rajan

              my file resides in remote system. from that system only i want to read a file. can you please tell me how can i do that? Regards Lijo

              D Offline
              D Offline
              Dimitri Witkowski
              wrote on last edited by
              #6

              Please see also my answer in this thread on CodeProject: [^]

              See my article about Windows 7 Taskbar timer here on CodeProject

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups