• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • 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
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

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