no-src / gofs

A cross-platform real-time file synchronization tool out of the box based on Golang
Apache License 2.0
466 stars 40 forks source link

delete the source files and source directories #350

Closed xiongdashan closed 4 months ago

xiongdashan commented 4 months ago

Hi everyone,

I would like to delete the source files and source directories after the file synchronization is complete. I couldn't find any related settings in the documentation. Is there a good way to achieve this?

tks!!

mstmdev commented 4 months ago

This feature is not currently supported. It seems to be a dangerous operation. Maybe you can use a custom shell script to achieve similar functionality (must use the latest code from the main branch), such as deleting the source directory after completing a full synchronization.

./gofs -source=./source -dest=./dest -sync_once  && rm -rf ./source

To reiterate, this is a dangerous operation and has not been fully tested.

xiongdashan commented 4 months ago

Copy that, thank you for your reponse!