The `Sync` task deletes all files in the target di...
# community-support
i
The
Sync
task deletes all files in the target directory, and then copies the new ones over. Is it possible to configure
Sync
(or some other task) to NOT touch the files that haven't changed? I'm using another tool afterwards, which reacts to the files being deleted, even though they are immediately recreated identically.
v
The Sync task deletes all files in the target directory, and then copies the new ones over.
Not exactly, it copies over the files and then deletes the files it not copy. That is more efficient. :-)
Is it possible to configure Sync (or some other task) to NOT touch the files that haven't changed?
That's then
Copy
. :-) Alternatively, you can configure the
Sync
task which files to retain afair.
i
That's then
Copy
. 🙂
But
Copy
doesn't delete files in the destination that have been deleted in the source, right?
v
But Copy doesn't delete files in the destination that have been deleted in the source, right?
Correct. I'm not aware of a built-in way to achieve that behavior except such a custom task you linked to. That one does some additional things to
.map
files though and if it is a non-incremental run, it just behaves like
Copy
. If that is what you want, it might be appropriate. Or you use
Sync
and configure which files to retain even if they were not synced.