Copy files from floppy drives 
Author Message
 Copy files from floppy drives

I am creating a "Backup/Restore" feature in a program.

I used the

COPY(filename,'A:\')

to copy the file from the current directory to a floppy.  That worked
fine.  I just need to add the error catching code so if a floppy is
not in the drive.

But when trying to reverse this, copy from a floppy back to the hard
drive I do not know the format.  For example, using a DOS command line
statement I would have typed:

COPY A:\TEST.TPS C:\DATA\TEST.TPS

How would I do this in CW2.0???

I just started using CW2.0 and comments would help, thanks...




Fri, 29 Jan 1999 03:00:00 GMT  
 Copy files from floppy drives

Quote:

> I am creating a "Backup/Restore" feature in a program.

> I used the

> COPY(filename,'A:\')

> to copy the file from the current directory to a floppy.  That worked
> fine.  I just need to add the error catching code so if a floppy is
> not in the drive.

> But when trying to reverse this, copy from a floppy back to the hard
> drive I do not know the format.  For example, using a DOS command line
> statement I would have typed:

> COPY A:\TEST.TPS C:\DATA\TEST.TPS

> How would I do this in CW2.0???

> I just started using CW2.0 and comments would help, thanks...



Have you tried the Copy command backwards?  I haven't but it might work.

The way I would do this is make the filename a variable. You do this in
the dictionary, Properties for the file, FullPathname area.  Put a
Global variable (a string) prefixed with a "!".  In your application,
load this string with the path and filename of the file before you open
it.  

Now when you are copying from A: to C:, make sure the file is closed and
change the path and file name in the variable to 'A:\test.tps', Copy it,
and there you are.



Sat, 30 Jan 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Windows XP COPY TO Floppy Drive

2. Copy file from network drive to local drive?

3. Determining Fixed Drives From Floppy Drives

4. Help, need to copy a 1474560 (1.404M) byte file to floppy disk

5. Copy file from network drive?

6. WIN API to copy all files form A: drive to C:\FOLDER

7. WIN API to copy file from A: drive to C:\Folder

8. Copying Files to another drive

9. Floppy and Hard Drive

10. Booting from floppy drive

11. floppy and hard drive programming

 

 
Powered by phpBB® Forum Software