Last post Jan 17, 2009 02:47 PM by patch1
Jan 02, 2009 06:33 AM|pebble|LINK
In VB.NET win Application, While using FileSystem.CopyDirectory to copy a directory to the destination path, it produces IOEXception was caught - "Couldnot complete operations on some files or directories". How to Solve this?
Jan 02, 2009 06:43 AM|vik20000in|LINK
Try to copy the same files manually and see if u get the same kind of error?
Also sometimes this error can come when the name of the file being moved is very large. You can also check if that is the case...
Jan 02, 2009 07:12 AM|pebble|LINK
I tried copying files manually.. didnot work..
Do you mean the Filename may be very large or depth of file in a directory may be large ?
Jan 02, 2009 07:19 AM|pebble|LINK
I tried copying files manually. didnot work..
Do you mean filename may be large.. or depth of the file in the directory is high ?..
Jan 02, 2009 06:00 PM|rami_nassar|LINK
try to copy the file into another path... or try to copy another file to the same path....
& check your results
Jan 06, 2009 10:44 PM|Bober Song - MSFT|LINK
Please double check the files or directories property.
You cannot copy a file over another file that is read-only, because overwriting obviously requires writing,
which you cannot do to a read-only file.
It doesn't matter whether the source file is read-only or not because you're not writing to that file. It's the target file that matters.
The documentation for the IOException.Data property says that it's type IDictionary. The IDictionary interface defines a Keys property that contains all the keys and you can use each key to get the corresponding value:
Catch ex As IO.IOException
For Each key As Object In ex.Data.Keys
Jan 07, 2009 01:03 AM|pebble|LINK
Dataproperty of the exception shows 'Access to path is denied'..
Target file is also read only. So it is unable to overwrite.
I tried by changing the target file attribute - same exception occurred..
Finally, i deleted the destination folder which conatins readonly files(entire directory) and copied again..
Jan 17, 2009 02:47 PM|patch1|LINK
I presume you are using VB2008 in which case the following command will overwrite read only files previously saved in the target directory.
hope this helps