System.IO.IOException: Invalid Signature

Can anyone explain why…I receive the following error when I attempt to Directory.GetFiles for all files in a shared drive folder location? Thanks!!!

Assign Activity
To: Delete_EmailAttachments (String Varable)
Value: Directory.GetFiles(“S:\Emails”,"*")

RemoteException wrapping System.IO.IOException: Invalid Signature.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.CommonInit() at System.IO.FileSystemEnumerableIterator1…ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) at System.IO.Directory.GetFiles(String path, String searchPattern) at lambda_method(Closure , ActivityContext ) at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)
at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context) at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity)
at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor) at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath) at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate)
at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Hi @ckikel

The variable within To Should be of Array of String

Bcz multiple files will get store der and .GetFiles will return array of string

Mark as solution and like it if it helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Thank you for your response. My bot is scheduled to run tomorrow morning. I’ll let you know the results. Thanks, again!

Hello @Pratik_Wavhal - With the array of string in place today, my unattended triggered bot faulted again with the same Invalid Signature error.
When I restart the faulted job in orchestrator manually, the bot runs without issue.
I am unsure why the source of my orchestrator job (manual vs trigger) has different results. Any thoughts?