Solved

Copy a file from one tolder to another on a network

Posted on 2002-04-25
6
162 Views
Last Modified: 2013-11-20
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
Comment
Question by:RJV
  • 3
  • 2
6 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
Comment Utility
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
 
LVL 23

Expert Comment

by:Roshan Davis
Comment Utility
0
 
LVL 23

Expert Comment

by:Roshan Davis
Comment Utility
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 86

Accepted Solution

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

should do it...
0
 

Author Comment

by:RJV
Comment Utility
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
 
LVL 86

Expert Comment

by:jkr
Comment Utility
Great that it worked!

Thanks!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 83
sameEnds challenge 3 105
Prevent this page from creating additional dialogs. 3 246
pre4 challenge 19 87
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This video discusses moving either the default database or any database to a new volume.

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now