Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default FileCopy and read-only

I'm using FileCopy to copy a number of files off the servers onto my C:
drive. Everything works fine except for the one file that is read-only. Any
way to persuade FileCopy to copy over that file even if it is a read-only?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default FileCopy and read-only

I just tested it, and it copied a read-only file just fine (as I expected).
Sure there is not some other problem in the code?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dkline" wrote in message
...
I'm using FileCopy to copy a number of files off the servers onto my C:
drive. Everything works fine except for the one file that is read-only.

Any
way to persuade FileCopy to copy over that file even if it is a read-only?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default FileCopy and read-only

Sub test()
Dim src$, dst$
src$ = "c:\test.txt"
dst$ = "c:\test1.txt"
If GetAttr(dst$) And vbReadOnly Then
SetAttr dst$, vbNormal
End If
FileCopy src$, dst$
End Sub


Dkline wrote:
I'm using FileCopy to copy a number of files off the servers onto my C:
drive. Everything works fine except for the one file that is read-only. Any
way to persuade FileCopy to copy over that file even if it is a read-only?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filecopy in vba macro Jodie[_2_] Excel Programming 0 September 5th 03 03:17 PM
Filecopy in vba macro Julio[_2_] Excel Programming 1 September 2nd 03 06:43 PM
FileCopy Dana DeLouis[_5_] Excel Programming 0 August 11th 03 12:57 PM
FileCopy John Green[_2_] Excel Programming 1 August 5th 03 08:55 AM
FileCopy error Chip Pearson Excel Programming 0 August 1st 03 02:43 PM


All times are GMT +1. The time now is 01:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"