# Compare file names and delete duplicate files in Grasshopper(need help)

**URL:** <https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664>\
**Category:** Grasshopper\
**Created:** [June 8, 2020, 7:43am UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664 "2020-06-08T07:43:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rh-3d-p](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rh-3d-p/32/485582_2.png) [@Rh-3d-p](https://discourse.mcneel.com/u/Rh-3d-p)\
**Post date:** [June 8, 2020, 7:43am UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664/1 "2020-06-08T07:43:19Z")

</div>

Hello everyone  
**need help** to this algorithm **Compare file names and delete duplicate files in Grasshopper**  
_i have x and y folder_  
i need to delete files in( x folder file) that names is duplicate  
but my algorithm doesn’t work currently

 ![all](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/6/9/69ceb1263ded137cb7beb53075efa1303ac1bee7.jpeg)  
my algorithm and folder in this zip file  
[delete dublicate file.zip](https://discourse.mcneel.com/uploads/short-url/A4BoX5VUoQ4iN33kXjAFMOacMDt.zip) (2.5 MB)

---

<div class="post-metadata">

**Author:** ![DavidRutten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/davidrutten/32/755688_2.png) [@DavidRutten](https://discourse.mcneel.com/u/DavidRutten)\
**Post date:** [June 8, 2020, 8:35am UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664/2 "2020-06-08T08:35:24Z")

</div>

`"a" = "b"`  
Is never true.

`a = b`  
Might be true sometimes, depending on the respective values of a and b.

---

<div class="post-metadata">

**Author:** ![gankeyu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gankeyu/32/487811_2.png) [@gankeyu](https://discourse.mcneel.com/u/gankeyu)\
**Post date:** [June 8, 2020, 9:04am UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664/3 "2020-06-08T09:04:44Z")

</div>

🤔 It’s a bit new seeing Grasshopper is used in file management.

---

<div class="post-metadata">

**Author:** ![Rh-3d-p](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rh-3d-p/32/485582_2.png) [@Rh-3d-p](https://discourse.mcneel.com/u/Rh-3d-p)\
**Post date:** [June 8, 2020, 9:35am UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664/4 "2020-06-08T09:35:25Z")

</div>

Is there a way to compare 2 list of strings?  
one by one

---

<div class="post-metadata">

**Author:** ![Rh-3d-p](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rh-3d-p/32/485582_2.png) [@Rh-3d-p](https://discourse.mcneel.com/u/Rh-3d-p)\
**Post date:** [June 8, 2020, 12:23pm UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664/5 "2020-06-08T12:23:30Z")

</div>

@Mahdiyar ?

---

<div class="post-metadata">

**Author:** ![Mahdiyar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mahdiyar/32/472862_2.png) [@Mahdiyar](https://discourse.mcneel.com/u/Mahdiyar)\
**Post date:** [June 8, 2020, 1:50pm UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664/6 "2020-06-08T13:50:55Z")

</div>

I guess you’re looking for [memberIndex](http://grasshopperdocs.com/components/grasshoppersets/memberIndex.html):

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/b/d/bd773090a48310c2b93a66b8789d68e7618a7f94.png)  
[MemberIndex.gh](https://discourse.mcneel.com/uploads/short-url/k53FQRfQPbCf9iESykfezuoeYio.gh) (17.9 KB)

---

<div class="post-metadata">

**Author:** ![Rh-3d-p](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rh-3d-p/32/485582_2.png) [@Rh-3d-p](https://discourse.mcneel.com/u/Rh-3d-p)\
**Post date:** [June 9, 2020, 8:36am UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664/7 "2020-06-09T08:36:46Z")

</div>

@Mahdiyar thanks but if{count number(in memeberindex)\>1.00} then dispatch work correct ?

---

<div class="post-metadata">

**Author:** ![Mahdiyar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mahdiyar/32/472862_2.png) [@Mahdiyar](https://discourse.mcneel.com/u/Mahdiyar)\
**Post date:** [June 9, 2020, 8:48am UTC](https://discourse.mcneel.com/t/compare-file-names-and-delete-duplicate-files-in-grasshopper-need-help/103664/8 "2020-06-09T08:48:14Z")

</div>

If you supply a Number value where a Boolean value is required it will automatically get converted

```auto
0 = false
>0 or <0 = true

```
