Fine
you were almost done @AryanSingh
–once gettting with array use for each loop and pass the array variable to that and change the type argument as string
–then inside the loop use a if condition and mention like item.tostring.contains(“BS_”)
If true will go to THEN part where use a add to collection activity like this
–in collections property mention like out_list_filepath
–and in item property mention like this item.ToString.Replace(“BS_”,“”)
and change type argument to string
where out_list_filepath is a variable of type list(of string) with default value like New list(of string) defined in the variable panel
–now we can use this out_list_filepath as a collection of filenames and we can pass that to a for each loop and make use of if where we want
It should actually work
May I know what Output we expect buddy
As this would actually replace the .CSV extension at the last of file name with null value like this Filename.CSV to Filename
Cheers @AryanSingh
This looks good actually
And I wonder why it didn’t
Can I have a view in the xaml if possible
Kindly share the xaml with project.json file all zipped together and let’s fix it buddy
Fantastic
i guess we miss something with items property in the add to collections
no worriies
–lets use a assign activity inside the THEN part before add to collections with a variable oftype string named out_filename out_filename = file.ToString.Replace(“.CSV”,“”).ToString
–now use a writeline activity next to this assign activity like this out_filename.ToString //this is to check whether the .CSV got replaced with null or not
–now lets use a add collections with collections property mentioned as out_list_filepath and item property as out_filename.ToString and Type argument as string
Kindly share the screenshot of the output panel after this run buddy
In the workflow it is showing that it has changed but not changing at the destination(Folder). Do i need to do any other steps for it to change the file name in the folder also!
Aaha
So you want that to get rejected in the folder path as well right
So next to add to collection use a move file activity where in the source mention as file.Tostring and in the destination mention as out_filename.ToString (which is the variable that we have from assign activity)