I have multiple files and each file contains name of file,i want to compare file name and content in file,Please guide
@Mayyur What type of File is it?
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?
File1.txt (7 Bytes) ,I want to check whether file name and content is same or not.
@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
ReadFiles_CompareName_UPL.zip (14.2 KB)
@Mayyur Were you facing problem in Moving files?
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)
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 ?
MoveFile_Reframework.zip (994.9 KB)