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 / C++ / MFC
  4. How to move a file

How to move a file

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialhelp
4 Posts 4 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.
  • V Offline
    V Offline
    vc _fragrance
    wrote on last edited by
    #1

    Hi, I want to move a file in my system to a remote system. For example I have a file "abc.wav" in my system . Now I want to move this file to another remote system's subdirectory(say "c://xyz"). IP of the remote system say "1.2.0.4". Can anyone help me. Thanks in advance.

    _ G D 3 Replies Last reply
    0
    • V vc _fragrance

      Hi, I want to move a file in my system to a remote system. For example I have a file "abc.wav" in my system . Now I want to move this file to another remote system's subdirectory(say "c://xyz"). IP of the remote system say "1.2.0.4". Can anyone help me. Thanks in advance.

      _ Offline
      _ Offline
      _tasleem
      wrote on last edited by
      #2

      use sockets for that purpose with file reading,u will find the code on code project as well just search "Network Transfer of File". thing u had to do is read a file from computer and send to another using sockets where other side will receive and then write on file in this way the transfer will take place.

      Tasleem Arif

      1 Reply Last reply
      0
      • V vc _fragrance

        Hi, I want to move a file in my system to a remote system. For example I have a file "abc.wav" in my system . Now I want to move this file to another remote system's subdirectory(say "c://xyz"). IP of the remote system say "1.2.0.4". Can anyone help me. Thanks in advance.

        G Offline
        G Offline
        Garth J Lancaster
        wrote on last edited by
        #3

        you could also attach to a share on the other machine eg \\1.2.0.4\c$\xyz either programmatically or through a script to map a drive, then copy the file there using copyfile() bit lower tech than using the socket suggestion ... 'g'

        1 Reply Last reply
        0
        • V vc _fragrance

          Hi, I want to move a file in my system to a remote system. For example I have a file "abc.wav" in my system . Now I want to move this file to another remote system's subdirectory(say "c://xyz"). IP of the remote system say "1.2.0.4". Can anyone help me. Thanks in advance.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          What about MoveFile() or SHFileOperation()? If neither of them accepts a UNC path, you can make use NetUseAdd() to map a drive letter to the remote share.


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          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