• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

Copy a file from one tolder to another on a network

Hi,

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.

Thanks!
RJV
0
RJV
Asked:
RJV
  • 3
  • 2
1 Solution
 
Roshan DavisCommented:
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

GOOD LUCK
0
 
Roshan DavisCommented:
0
 
Roshan DavisCommented:
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

 
jkrCommented:
CopyFile ( "c:\\mypath\\myfile.txt", "\\\\server\\share\\targetdir");

should do it...
0
 
RJVAuthor Commented:
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!
RJV
0
 
jkrCommented:
Great that it worked!

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now