Is there any way to check if there are same file name existing in different zip file?
Hi @fniedez
You can try this
Use unzip activity to unzip it extracts everything out…Now use for each file folder which has an option to include files in sub folders as well and you will be able to get all the sub folder related files as well
Then use Directory.Getfiles for second zip file contents and give the filter as the file name required
cheers
How can I even check if there’s same FileName in two different zip files? Also, how can I even check if all the data’s of .config files are same?
This is how you need to acheive please follow the steps
Use unzip activity to unzip it extracts everything out…Now use for each file folder which has an option to include files in sub folders as well and you will be able to get all the sub folder related files as well
Then use Directory.Getfiles for second zip file contents and give the filter as the file name required
if found then read the file and split the extracted string using new lien character and compare both the arrays …if there are difference print them
cheers
Hello @Anil_G
I am new here, can you help me on this? Please create an example of your Comment Activity?
Hi @fniedez
Please use this in assign which will give all unmatched records between two files
Str1 - text read from file one
Str2 - text read form file two
Use this in assign activity
Umatchedlist = str1.split(environment.newline(),stringsplitoptions.none).ToList().Except(str2.split(environment.newline(),stringsplitoptions.none).ToList())
Unmatchedlist (variable type list) is the list of values which are not matching between the files
Cheers
Where can I place the Assign Activity?
So what im understanding is you want to check is there any files with same name in 2 diffrent zip?
In the palce where you see comment in my screenshot
Maybe this can help , please go through but if you need more help related to it please let me know
Is not the same on my case. Can you please help me? I’ve already sent a message to you. Kindly, check it.
What is the variable type of “Unmatchedlist”?
Use curly braces{} around the environment.newline()
str1.split({environment.newline()},stringsplitoptions.none).ToList().Except(str2.split({{environment.newline()},stringsplitoptions.none).ToList()).ToList()
Hope this helps
Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.