0

Is it possible to delete a file from the filesystem in a SQL trigger in SQLite?

I have a table which contains the path to a file. Is it possible to create a trigger that starts when a deletion occurs and that deletes the file whose path is the one contained in the deleted row? How can I do this?

Thanks!

1 Answer 1

1

You can try to create a user-defined function that will take care of deleting the file and call it from the trigger.

Here is an example: SQLiteFunction Simple Not Working

Sign up to request clarification or add additional context in comments.

1 Comment

I'm programming in C++, so following your answer I was able to refine my search and found this: blog.renanfernandes.com.br/2010/09/…. Works great! Thanks for your help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.