I am having trouble reading data out of an array.
I am using a WMI query to pull a directory tree from a remote machine, copy it to another remote machine, and then delete the original.
The problem I have is when reading the directories off of the source with the query using Win32_Subdirectory.
Anyway, it works on one directory, but then it goes to a second location to do the same process on another location and it fails. It is failing trying to read the values from the "colFolders". I get the error message: (NULL)0x80041017.
The line it dies on is "For each subfolder in colFolders". I have added a check with "not isnull" and "not isempty" right before the "for each", but it gets thru and still dies on the "for each".
So I need to know why it is happening and/or how can I test to avoid it? I am assuming that it does not like the data in the array or it is infact null.
Any ideas how to avoid this? I am not ready to just escape the error with a "resume next" because it is critical that I get ALL the data copied to the destination. I cannot skip any of the data.
Any ideas?
I am using a WMI query to pull a directory tree from a remote machine, copy it to another remote machine, and then delete the original.
The problem I have is when reading the directories off of the source with the query using Win32_Subdirectory.
Anyway, it works on one directory, but then it goes to a second location to do the same process on another location and it fails. It is failing trying to read the values from the "colFolders". I get the error message: (NULL)0x80041017.
The line it dies on is "For each subfolder in colFolders". I have added a check with "not isnull" and "not isempty" right before the "for each", but it gets thru and still dies on the "for each".
So I need to know why it is happening and/or how can I test to avoid it? I am assuming that it does not like the data in the array or it is infact null.
Any ideas how to avoid this? I am not ready to just escape the error with a "resume next" because it is critical that I get ALL the data copied to the destination. I cannot skip any of the data.
Any ideas?