Solved

Function for copying files

Posted on 1997-08-05
3
186 Views
Last Modified: 2013-12-26
I simply want to copy an aiff file from a local hard disk to
a server. I can't locate a function to do this. Everything I've found is for creating, moving, deleting, etc, but not copying.
0
Comment
Question by:RadNetGML
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
PAD earned 50 total points
Comment Utility
Toolbox don't have a copy routine.
Severals ways to do that :

simply open source, create destination and read source by block and wrote in dest until EOF then close. Your file is copied !

another way is to use Apple Event to tell the finder to do the copy for you... more complex but let the finder do the job and you'll have a marvellous progressing box indicating the job.
0
 
LVL 1

Expert Comment

by:PAD
Comment Utility
Oops i forgive somehing very important with the 1st solution :
don't forget to copy the ressource fork AND the data fork (if exist) in order to make a real copy of the file...
0
 

Author Comment

by:RadNetGML
Comment Utility
I have implemented the Open, Read, Write, Close functionality.
I have to copy more than a block at a time since the files are
large. I like the Apple Event comment, but I'm writing an extension for an app that handles all of the UI. Thanks for the
response.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
paragon account problem 9 96
Powershell based monitoring system 2 126
lucky13 challenge 11 111
isEverywhere  challenge 19 61
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

762 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

11 Experts available now in Live!

Get 1:1 Help Now