Hello Team,
I have multiple files and each file contains name of file,i want to compare file name and content in file,Please guide
May I know what type of files it is and also along with file name is it contains anything else ?
text file,Like C:\Folder\File1.txt is name and content is File1,so i want to match name and content
Can you please provide one sample file and specify what exactly you are looking for in that file?
@Mayyur Follow these Steps :
- Get all Files from the Folder and Store it in a Array of String variable
- Loop through the files using For Each
Inside For Each
Use read Text File Activity and Pass the item as Value
Output Of Read text File, Use it to compare with FileName
I have tried the same
@Mayyur I updated your workflow a bit Check this as well :
ReadFiles_CompareName.zip (14.7 KB)
It worked,The above also worked fine,Thank you
You are trying with item.Equals(Op_Text)
But the item will always have the full file path and you Op_Text will have only the file name. Hence this condition will never work.
You should try Filename contains file text.
I have updated your workflow. Please check if that helps.
ReadFiles_CompareName.zip (14.5 KB)
Hello,
Can you please provide the same WF implemented using reframework
@Mayyur Ok , I will try and Update you, But meanwhile Can you try it as well , It can be easy to implement as the Logic is Already present in the Workflow I provided
Im trying to do the same, but getting error…
@Mayyur You can provide that Workflow then , it might be easy for me to correct it, Also What error do you get ?
Sure