How To | Use the dir.remove() Lua function to perform audio file cleanup
Learn how to effectively use the dir.remove() Lua function to quickly and conveniently clean up audio files in your system.
If you are not finding the results you need and still have questions, submit a request using the form below and our Tech Docs team will get right on it. Our goal is to provide the content you need!
Your engagement helps us create the content you need. Click here to review this article.
Table of Contents
On Q-SYS systems where recording and messaging features generate high quantities of audio files, it may be necessary to run a script that deletes files on a regular basis to avoid filling the Q-SYS media drive. While the dir.remove() function can delete a specified directory, that directory must be empty for the function to work. You must use the os.remove() function beforehand to delete files within the directory.
To see an iterative scripting example of deleting files followed by the parent directory, see the dir.remove() documentation within the dir (Directory) topic in Q-SYS Help.