• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • 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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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