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
Printable View
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
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]