?
Solved

How to fprintf to write out to a remote file

Posted on 2004-04-02
5
Medium Priority
?
345 Views
Last Modified: 2010-04-15
Being the novice, infrequent programmer that I am, I am trying to use the fprintf command to write data out to a file.  Simple enough.  In fact, I have done it on several occasions but this time there is a twist that my simple mind can't figure out.  I want to write out to a file location on another PC.  How can I do this?
0
Comment
Question by:fgs3124
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 46

Expert Comment

by:Kent Olsen
ID: 10741216
Hi fgs3124,

There are a couple of ways to do this, but both PCs have to cooperate for this to happen.

You can mount a drive on the remote PC using the Windows' "shared folders", unix's NFS mount, or Samba.  Then open the file on the shared drive and write to it.

You can also create a client/server application that "sends" the file from your system to the partner program on the other PC.


The bottom line is, it's a network environment and requires a network solution.


Kent
0
 
LVL 9

Accepted Solution

by:
ankuratvb earned 1500 total points
ID: 10741430
0
 
LVL 12

Expert Comment

by:stefan73
ID: 10741528
Hi fgs3124,
You can open/create a file residing on a share on another PC using the

\\machine\share\directory\...

syntax. Or use slashes instead of backslashes, should work, too.

Cheers,
Stefan
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10741556
Hi fgs3124,

Kent is right ... you need permissions on the remote machine ....
Another way ... Maybe you can write the file locally and then invoke an ftp session to transfer the file ...

may be you can run a server on the remote machine that accepts the data and writes to the file locally ... it all depends on what kind of access you have on remote machine and what kind of setup you have

Sunnycoder
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question