# Delete if duplicate exists while moving

**URL:** https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464
**Category:** Help & Support
**Created:** [June 12, 2022, 11:28pm UTC](https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464 "2022-06-12T23:28:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![PizzaPete](https://resource.dopus.com/letter_avatar_proxy/v4/letter/p/dfb087/32.png) [@PizzaPete](https://resource.dopus.com/u/PizzaPete)
#### Post date: [June 12, 2022, 11:28pm UTC](https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464/1 "2022-06-12T23:28:11Z")

</div>

While moving files I would like to delete files in the source if a duplicate already exists in the target.

Does anyone know if that's possible?

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [June 12, 2022, 11:56pm UTC](https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464/2 "2022-06-12T23:56:41Z")

</div>

How are you defining "duplicate"? Just the filenames/paths being the same, or other details as well?

---

<div class="post-metadata">

### Author: ![krisjohn](https://resource.dopus.com/user_avatar/resource.dopus.com/krisjohn/32/40978_2.png) [@krisjohn](https://resource.dopus.com/u/krisjohn)
#### Post date: [June 13, 2022, 1:25am UTC](https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464/3 "2022-06-13T01:25:19Z")

</div>

I recognise this annoyance. When you want to move a big directory structure over to somewhere that already has _some_ files, and you don't want to waste time copying files that already exist you typically choose "skip" for any matches, but that leaves a bunch of files in the source folder that you have to manually delete. I kind of want a "just delete source" option for matching files.

---

<div class="post-metadata">

### Author: ![PizzaPete](https://resource.dopus.com/letter_avatar_proxy/v4/letter/p/dfb087/32.png) [@PizzaPete](https://resource.dopus.com/u/PizzaPete)
#### Post date: [June 13, 2022, 1:41am UTC](https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464/4 "2022-06-13T01:41:36Z")

</div>

How does Directory Opus consider files as duplicates? If there were another selection beside skip, it would say delete or delete any future selected.  
The purpose is, I have a hard drive used for backups copying files to my main storage where some files got deleted. The backup hard drive will be secure erased afterwards and donated. If I get interrupted during the process I have to start over and go folder by folder. That will take a long time because it's an 8TB with hundreds of thousands of folders and files.

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [June 13, 2022, 1:44am UTC](https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464/5 "2022-06-13T01:44:21Z")

</div>

If it's only filenames then click Skip All (or Skip Identical, if you want to consider a few other attributes like size and date) and the files that already exist won't be moved. They'll then be the only things left on the source drive, at which point you can delete them.

---

<div class="post-metadata">

### Author: ![PizzaPete](https://resource.dopus.com/letter_avatar_proxy/v4/letter/p/dfb087/32.png) [@PizzaPete](https://resource.dopus.com/u/PizzaPete)
#### Post date: [June 13, 2022, 2:56pm UTC](https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464/6 "2022-06-13T14:56:21Z")

</div>

I'm reluctant to Skip All Identical then later deleted all of the folders and files. I've gotten burned doing that a few times because I ended up removing folders that had not been copied yet.  
Maybe someone know how to write a plugin or has a good idea to try it the way me and krisjohn wants.

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [June 13, 2022, 4:58pm UTC](https://resource.dopus.com/t/delete-if-duplicate-exists-while-moving/41464/7 "2022-06-13T16:58:00Z")

</div>

If the last move + skip-all completed all the way through, then anything left must already be in the destination (or at least some other thing with the same name and path must already be there).

If you're worried you forgot to move something, you could do one last move + skip-all at that point to double-check (which should be very quick).
