I need to compare two different folders and check if the text file was only existed in one folder?
Note: I have two different zip files “beforeExample” and “afterExample”, I need to check two zip files if they have both files named correlation_order.txt. If not refer then print the expected result
Expected Result:
correlation_order.txt
This file only exists in afterExample.zip
in above the image you can see Inputfile and Expath in Arguments which is Input path of zip folder and folder where the files need to be extracted and Extractpath is Final path of zip files which is extracted.
After that you can find the text by using Path exist or Get Directory method. unzip.xaml (7.5 KB)
Please check and let me know the feedback from you
You try this method to get the files inside the zip folder
Then you need to use this method to get the list from the both the folders and you can check for the file is existing in the both the folders and continue your next steps
FIles_ZIP_A.Any(Function(x) x.ToUpper.Trim.Equals(“CORRELATION_ORDER.TXT”)) and FIles_ZIP_B.Any(Function(x) x.ToUpper.Trim.Equals(“CORRELATION_ORDER.TXT”))
How can I define if all the files are the same exist in two different files? The output will be TRUE or FALSE
And how can I check two different extracted files if they have the same filename/textfile? This is the name of the text file correlation_order.txt so the output will be:
The output in this step will be like this:
correlation_order.txt
This file only exists in afterExample.zip
Sorry for late reply, it works but you definitely you put the correlation_data.txt as literal string. It is possible if you can check first all the possible text file in two different files. Then if the Before files have not filename correlation_data .txt therefore it can find it on the After file. Then the output is the same.
Note: do not put correlation_data.txt as literal string you need to determine if Before and After have correlation_data.txt and if not then print the expected output.
Sorry for late reply, it didn’t solve the problem. I’ll give you a scenario.
Scenario:
Extract two different zip files (before and after).
Check all the config files and their names inside of the Before files then you need to compare all the files of before in After files if there are the same name.
Check the Before files again if has a correlation_data.txt then compare it to After files if after file has only a correlation_data.txt,
then the expected output:
* correlation_order.txt
This file only exists in afterExample.zip
Note: In this 3rd part do not print literal or insert as a string of the name “correlation_data.txt” the flow will be automatically look the text file in two different folders.
Compare the data of all config files inside of the Before Files to After Files. Then the expected output: