home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
HTPC Projects
Software
Tools and other software
Batch to update (or clean) my TV recordings folder
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mm1352000" data-source="post: 1195553" data-attributes="member: 82144"><p>Why?</p><p></p><p>It would be possible to create a batch script to delete or update invalid entries.</p><p></p><p>MySQL supports the LOAD_FILE() function:</p><p><a href="https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_load-file" target="_blank">https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_load-file</a></p><p></p><p>...which apparently can be used to check if a file exists. Therefore it may be possible to execute a "pure" MySQL script and avoid having to install any scripting environment (eg. PHP, Perl). For example, maybe try:</p><p></p><p>DELETE FROM Recording WHERE LOAD_FILE(fileName) IS NULL;</p><p></p><p>I suspect that this function would perform very slowly if you have many recordings. Therefore it may be better to create a "proper/full" script. I leave that up to you.</p></blockquote><p></p>
[QUOTE="mm1352000, post: 1195553, member: 82144"] Why? It would be possible to create a batch script to delete or update invalid entries. MySQL supports the LOAD_FILE() function: [URL]https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_load-file[/URL] ...which apparently can be used to check if a file exists. Therefore it may be possible to execute a "pure" MySQL script and avoid having to install any scripting environment (eg. PHP, Perl). For example, maybe try: DELETE FROM Recording WHERE LOAD_FILE(fileName) IS NULL; I suspect that this function would perform very slowly if you have many recordings. Therefore it may be better to create a "proper/full" script. I leave that up to you. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
HTPC Projects
Software
Tools and other software
Batch to update (or clean) my TV recordings folder
Contact us
RSS
Top
Bottom