AlexF777
asked on
Move\Copy Files with\without override
What different methods are available ?
Thank You
-Alex
Thank You
-Alex
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
to check if file exists, do this
If fso.FileExists("c:\myfile. txt") Then
MsgBox "File Exist"
End If
hongjun
If fso.FileExists("c:\myfile.
MsgBox "File Exist"
End If
hongjun
Thanks for selecting my comment as the answer. But why the grade of "B"? It could have been an A grade since my comment solved your problem directly. Note that a grade A given does not differ from a grade B or C to a questionner. It will not affect your question points value but rather it only affect your grading record. Your grading record will be better if you shows consistent A grading awarding habit.
Please see Tip #11 - Grade quickly and fairly
http://cd-eepages.fateback.com/asking.html
Please explain the reason for the B grade.
hongjun
Please see Tip #11 - Grade quickly and fairly
http://cd-eepages.fateback.com/asking.html
Please explain the reason for the B grade.
hongjun
ASKER
Ok, what I am trying to accomplish is to override destination files if they already exist ( would be nice to be able
to use wild-cards too ).
fso.CopyFile will do it but only if destination is not read-only, fso.MoveFile -will not do it at all.
may be I am wrong ?
-Al
to use wild-cards too ).
fso.CopyFile will do it but only if destination is not read-only, fso.MoveFile -will not do it at all.
may be I am wrong ?
-Al
wildcards?
Perhaps you try using Shell api
hongjun
Perhaps you try using Shell api
hongjun
' true means override
fso.CopyFile "c:\sourcefile.txt", "c:\destination.txt", False
hongjun