# check files and file contents in 2 folders

**URL:** <https://forum.ansible.com/t/check-files-and-file-contents-in-2-folders/13065>\
**Category:** Ansible Project\
**Created:** [July 4, 2013, 10:10am UTC](https://forum.ansible.com/t/check-files-and-file-contents-in-2-folders/13065 "2013-07-04T10:10:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![celine](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@celine](https://forum.ansible.com/u/celine)\
**Post date:** [July 4, 2013, 10:10am UTC](https://forum.ansible.com/t/check-files-and-file-contents-in-2-folders/13065/1 "2013-07-04T10:10:36Z")

</div>

Hi,

I wish to compare 2 folders to see if the files and file contents are the same. Can it be done?

This is my command:  
$ ansible-playbook playbook.yml --check --diff

This is my playbook:  
action: copy src=${item.name} dest=${item.groups}  
with\_fileglob:

- { name: ‘/home/celine/Desktop/Folder1/_', groups: '/home/celine2/Desktop/Folder2/_’}

I got a list of fatal error.

Thanks

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 4, 2013, 12:13pm UTC](https://forum.ansible.com/t/check-files-and-file-contents-in-2-folders/13065/2 "2013-07-04T12:13:28Z")

</div>

First off, you are using old pre-1.2 variable syntax here, and should not.

{{ [item.name](http://item.name) }}

is preferred.

To answer your question, no. dest takes a single parameter, not a list.
