We we're polling a folder with almost 12,000 files to delete some items. The following error is returned:
Exception in Task: System.IO.IOException: The program issued a command but the command length is incorrect.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption, Boolean checkHost)
at System.IO.Directory.InternalGetFiles(String path, String searchPattern, SearchOption searchOption)
at VisualCronService.SearchAPI.GBOJMALLCMLMLNHFKFPIIPCCIDNIICBOHHBM(FileFilterClass , VariableReplacerClass ) in C:\sourcefiles\code\VisualCronService\Jobs\FileFilter\SearchAPI.vb:line 207
at OBOKIIHBDBPMCFALPGECCIFHCDJPEDKODDGK.LGEKMJEBHMPHOPBNFEILIMOCHGEDBBMJKKAL.FBCJBHDLIFGNJMDPLNNPNMFPDKJJBDFDEIIB() in C:\sourcefiles\code\VisualCronService\Jobs\TaskProcesses\File\clsProcessTaskFileDelete.vb:line 39
We could get it to work by deleting 7,000 of the files. Task then worked without an error. Please advise.