DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005
    Posts
    42

    Copying files to another server

    Hello everyone,

    I am working on a project where I have to maintain a huge web repository.Hence I need to split up the repository and store the pages in multiple servers.I was wondering if there are any C/C++ commands to copy files in another computer/server.To sum it up usually we open a file and then write to that file and then close it , but its in our own computer, Now all I want to do is open up a file in another server and then write to it and then close it.Any help would be appreciated.Thanks in advance .

    Tapajyoti

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    if the file system installed on your computer supports remote file access, then the standard file I/O interfaces of C++ (<cstdio> or <fstream>) should work just fine. Simply provide the full pathnane of the files when you open them.
    Read about fstream here: http://www.devx.com/DevX/LegacyLink/9397
    Danny Kalev

  3. #3
    Join Date
    Jan 2005
    Posts
    42
    Thanks a lot Danny,

    I just asked the sys admin and he said that remote access of files is not installed on the server hence I can't use the "rfstream" :( . Thanks neways for ur help, you guys are really life savers,its such a relief to know that there are such ultra-brilliant ppl on the web helping others voluntarily.

    Cheers

    Tapajyoti

  4. #4
    Join Date
    Dec 2003
    Posts
    3,366
    if you cant do that you can mount the remote machine as a local drive and still get away with some things but each machine has to mount to same letter or youll need a config file or whatnot

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links