When we create an activity, we sometimes add files to these activities. The added files are mostly jpg, png or pdf files. However, these files have a single use. In other words, I do not need to keep the attachment of the file after reaching the assigned activity by e-mail.

For this reason, I want all the data in the folder to which the files are added to be deleted automatically at certain times. Can I do this from the Scheduled Tasks area? If so, how can I do it. Can you give detailed information.

  • 3
    You could easily delete a folder using your system's cron (if you have access), however that would leave lots of db entries expecting files that now don't exist, which may cause problems. Sounds like you'd need someone to write you a custom extension to do this. Alternatively you could use civirules to delete the activities themselves, but I suspect you want to keep those.. – artfulrobot Jan 24 '20 at 9:05
  • You are absolutely right. DB records will stop even if the files are deleted. This may be a problem in the long run. However, it is not possible for me to write an extension for this. It was a pity that my request remained the result. Thank you for the info. – Fatih ATEŞ Jan 25 '20 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.