Pass file directory as argument

Hi,
I assign the path in my config sheet and i pass the folder path as argument(Data_folder) and i declare
Directory.Getfiles(Data_folder) in my flow.
But it show as faulted.

1 Like

@Manikandan.T Screenshots of the Errors are appreciated and the issues can be solved faster :grinning:

@Manikandan.T,

what exception you are getting.
Hope you are passing the full path of the directory

Hi @Manikandan.T

Directory.Getfiles(Data_folder) Datatype should be array of string(String[])

Cheers,
JothyPrasanth M

Hi
arr_FilePath = Directory.GetFiles(Data_folder.Tostring)

Where arr_FilePath is a variable of type string array
And Data_Folder is a variable of type string

Make sure that this structure is maintained

Or kindly let us know what error you were getting on using this
Cheers @Manikandan.T

@Manikandan.T

I suggest, please check the path that you have given in the config file. I guess it is incorrect

error1

Yah this looks fine
May I know what was the error you were getting
Cheers @Manikandan.T

If i declare the path directly it work perfectly.
Example: Directory.GetFiles(“C:\Users\new\Desktop\Process”)

message

1 Like

Great
So value is not passed
That’s the problem
Kindly try with this step and let me know pls

The only possibility is the arguments been passed
We need to check whether the config has that key name
in_config( “Path_To_Save_Attachments” ).Tostring

Kindly check like whether there is a term like Path_To_Save_Attachments in the config file
And if there we need to check whether the argument is been passed to the workflow or not and for that before to this assign activity use a writeline activity and mention like this
in_config( “Path_To_Save_Attachments” ).Tostring

So that we will come to know the value in the output panel

That could be the only reason
Cheers @Manikandan.T @soumi_soumiya

1 Like

Is it working guys @Manikandan.T @soumi_soumiya

We got it
Thank you.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.