# Feature Request: 'Delete' File Before It's Downloaded

**URL:** https://forum.syncthing.net/t/feature-request-delete-file-before-its-downloaded/14726
**Category:** Feature
**Created:** [March 31, 2020, 9:00am UTC](https://forum.syncthing.net/t/feature-request-delete-file-before-its-downloaded/14726 "2020-03-31T09:00:32Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![JipHop](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/ed8c4c/32.png) [@JipHop](https://forum.syncthing.net/u/JipHop)
#### Post date: [July 6, 2021, 9:49am UTC](https://forum.syncthing.net/t/feature-request-delete-file-before-its-downloaded/14726/9 "2021-07-06T09:49:59Z")

</div>

I tried this and indeed ended up with a conflict file instead.

I’m also looking for a way to delete (an ignored file) from the directory tree of the global model, without first downloading the file.

For example: I have ignored bigfile.zip on my device. I now want to delete bigfile.zip on all connected devices, without first downloading it. How would I go about this?

I tried to trick Synching as follows:

- Disable fs watching on local device
- Ignore bigfile.zip on local device
- Make bigfile.zip on remote device (bigfile.zip has never been seen by local device)
- Create an empty file on local device called bigfile.zip
- Unignore bigfile.zip on local device
- Trigger a rescan of bigfile.zip to detect it has been added to local device
- Immediately delete bigfile.zip from local device after rescan, to trigger deletion from all devices

However this causes a sync conflict, resulting in the local device still downloading the whole file (renamed to bigfile3.sync-conflict-20210706-063508-6FSPH2I.zip).

I’m currently evaluating if it’s possible to make a Syncthing client wrapper, with the ability to sync placeholders files akin to Resilio Selective Sync. Deleting a file from all devices by deleting the placeholder is one of the desired features.

Would it be possible to implement this in the REST API with an endpoint like POST /rest/db/delete taking folder and file parameters?

---

_[View the full topic](https://forum.syncthing.net/t/feature-request-delete-file-before-its-downloaded/14726)._
