compare two folder content

hello,

I couldn’t find any search result for what i am looking for. I am aware of working with “do shell script” command. I cannot use it because I have a lot of variables that I need to keep and pass along from other work flow.

I want to be able to get a result where i will get result stating that content of folders are identical or they are different.

It would be good to be able to get the files that are different as well. Below is a sample code that i have in shell

Is it every possible to do the below task with applescript?

If anyone can help me that would be greatly appreciated!

Thanks,

Riz

diff -r -q “$Actual” “$Expected”

diff -r “$Actual” “$Expected” &> /dev/null
if [ $? -eq 0 ]
then

time stamp the log file

echo -n date "+%Y-%m-%d @ %H:%M:%S" >> “$path”

echo " PASSED $title" >> “$path”
echo “$title-Passed” >> “$path_summery”

echo passed
else
echo “--------------------------------------------------------------------------------------------------------------------” >> “$path”

time stamp the log file

echo -n date "+%Y-%m-%d @ %H:%M:%S" >> “$path”

echo " FAILED $title" >> “$path”
echo “$title-Failed” >> “$path_summery”

diff -r -q “$Actual” “$Expected” >> “$path”

echo failed

echo “—” >> “$failed_result”
echo “$title” >> “$failed_result”
mkdir “$failed_data”
cp -r -f “$Actual” “$failed_data”
diff -r -q “$Actual” “$Expected” >> “$failed_result”