Directory method is not working properly

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

Print the data_folder argument before assign activity. And check whether it is holding the path or not.

Hi @soumi_soumiya

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

Cheers,
JothyPrasanth M

1 Like

Hi @soumi_soumiya

Can you pass directly the path and retry it.

cheers :smiley:

Happy learning :smiley:

2 Likes

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 @soumi_soumiya

3 Likes

Thanks for your reply…
I need to pass it through argument

2 Likes

Okies so can i know what error did you encounter :smiley: @soumi_soumiya

cheers :smiley:

Happy learning :smiley:

1 Like

I’m Done with this structure still i’m couldn’t get it.

May i know you were getting
@soumi_soumiya

This is the problem.

I couldn’t find see any error here so far
It looks perfect but if I can have the error message rather than Assign Faulted I could solve it easily

But still 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