File copying -- Permission denied 
Author Message
 File copying -- Permission denied

I can copy a file to a blank floppy disk using:

    oFileSys.CopyFile strDirectoryPath & strSourceFile, strDestinationFile

where strDestinationFile = "A:\Destination".  This works fine, but if I try
to delete any files on the disk first, using:

    oFileSys.DeleteFile "A:\*.*, True

The files are deleted without any errors, but my file copy code no longer
works: I get  a  'Permission denied' error message.
  I have found that if I modify the code to:

    oFileSys.CopyFile strDirectoryPath & strSourceFile, "A:" &
strDestinationFile

The copy takes place, but I don't understand why a destination of
"A:A:\Destination" should be needed, and it will no longer work in the case
where the disk is blank and I don't need to delete files.  I realise I could
just say 'what the heck' and give a delete command regardless, but I want to
know what's going on.

All comments gratefully received

Leonard



Sun, 08 Aug 2004 08:32:31 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Permission Denied when copying a file to the SendTo folder

2. Copy file over network : Permission Denied

3. Permission denied when copying a file

4. error 70 - permission denied when copying files

5. Can anyone help with a permission denied error when copying a file

6. Getting Permission Denied error, using FSO.Copy or InUse.exe

7. Permission Denied Error On objFile.Copy

8. Permission denied when trying to copy over unregistered dll

9. deleting files with file system object ( Permission denied error )

10. LDB File Locked, permission denied.

11. Backup active database file (Permission Denied)

12. LDB File Locked, permission denied.

 

 
Powered by phpBB® Forum Software