|
-
May 3rd, 2000, 12:08 AM
#1
Thread Starter
Hyperactive Member
Can anyone tell me how to error-trap this so i overwrite files even if they are there?/
Many thanks
FilesCopied.CopyFolder "d:\" + "All Products" + "\" + "java Files", Path2 + "\" + "attuk" + "\" + Products.Text + "\" + "accprice", True
-
May 3rd, 2000, 05:22 AM
#2
Hyperactive Member
Just an idea ...
Put two filelist controls on your form. Set the visible properties of both to false. Set the path of one to the destination directory for the files you are copying and the other to the source. Then compare the files in each to delete any files that might block your operation before replacing them.
For nElement2 = 0 to (Filelist2.Count - 1)
For nElement1 = 0 to (FileList1.Count - 1)
If Filelist1.list(nElement1) = FileList2.List(nElement2) then
Kill Filelist1.list(nElement1) 'delete it first
End If
Next
FileCopy(FileList2.list(nElement2),FileList1.List(nElement1))
Next
[Edited by scuzymoto on 05-03-2000 at 06:27 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|