Results 1 to 4 of 4

Thread: Read a file which is located in another machine

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Read a file which is located in another machine

    Hi all,

    I want to get a file path(say a text file) to read and do some processing on it. So the file path is like this, as an example.

    Code:
    "G:\\Work On\\CPP\\ReadFolder\\Data.txt"
    So I want to change this path to refer another PC. How can I do it.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  2. #2

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: Read a file which is located in another machine

    Oh, I got it. Initially I try it as follows.

    Code:
    "\\\\192.168.2.88\\Test$\\Data.txt"
    Used '$' sign to define the shared folder. But it wont work. So after doing some experiment I come across with following conclusions.

    1) Should the file included in shared folder, Test is shared.
    2) Should login to the PC as admin, where file is contain
    3) Should have write permission to that folder

    What you guys think about it.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Read a file which is located in another machine

    The file share needs to be configured correctly to start with. Can you make that assumption?

  4. #4

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: Read a file which is located in another machine

    I'm not get you. "shared need to be configured correctly"?

    Simply I shared that folder login as admin.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width