Copy a file from one tolder to another on a network

Posted on 2002-04-25
Last Modified: 2013-11-20

I need to resolve on an asap basis how to best copy a file from one folder to another on a network. The idea is to have the computer name and destination path in advance. Copying should be from a 9x machine to NT/2K/XP.

For the sake of speed I've tossed lots of points for this question, as I'm sure I'll have some real good ideas.

Question by:RJV
  • 3
  • 2
LVL 23

Expert Comment

by:Roshan Davis
ID: 6970515
Have u tested CopyFileEx API

Or u need the GUI of the copy file while copying ?
If yes u can use

shell API function SHFileOperation

LVL 23

Expert Comment

by:Roshan Davis
ID: 6970520
LVL 23

Expert Comment

by:Roshan Davis
ID: 6970728
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

LVL 86

Accepted Solution

jkr earned 400 total points
ID: 6971048
CopyFile ( "c:\\mypath\\myfile.txt", "\\\\server\\share\\targetdir");

should do it...

Author Comment

ID: 6971354
Hi jkr,

Your answer is the simplest, most elegant and, after some trial and error, it worked. The problem is that you only gave a destination path. The function needs that and the filename, plus a TRUE or FALSE as a 3rd parameter.

Thanks for the help!
LVL 86

Expert Comment

ID: 6971365
Great that it worked!


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

861 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