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="pünktchen" data-source="post: 1196202" data-attributes="member: 107846"><p>Try this in a batch file:</p><p></p><p>[CODE=WinBatch]@echo off</p><p>chcp 1252</p><p></p><p>set RECORDINGS=D:\Aufnahmen</p><p>set MYSQL=C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe</p><p></p><p>setlocal enabledelayedexpansion</p><p></p><p>for /R %RECORDINGS% %%i in (*.xml) do (</p><p> if not exist "%%~dpi%%~ni.ts" (</p><p> set FILENAME=%%~dpi%%~ni.ts</p><p> set FILENAME=!FILENAME:\=\\!</p><p> echo SET CHARACTER SET 'latin1';> cleanup.sql</p><p> echo DELETE FROM `mptvdb`.`recording` WHERE '!FILENAME!' = `fileName`>> Cleanup.sql</p><p> timeout /t 5 /nobreak</p><p> "%MYSQL%" --user=root --password=MediaPortal < Cleanup.sql</p><p> del /f /q "%%~dpi%%~ni.xml"</p><p> del /f /q "%%~dpi%%~ni.jpg"</p><p> del /f /q Cleanup.sql</p><p> )</p><p>)</p><p></p><p>exit[/CODE]</p></blockquote><p></p>
[QUOTE="pünktchen, post: 1196202, member: 107846"] Try this in a batch file: [CODE=WinBatch]@echo off chcp 1252 set RECORDINGS=D:\Aufnahmen set MYSQL=C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe setlocal enabledelayedexpansion for /R %RECORDINGS% %%i in (*.xml) do ( if not exist "%%~dpi%%~ni.ts" ( set FILENAME=%%~dpi%%~ni.ts set FILENAME=!FILENAME:\=\\! echo SET CHARACTER SET 'latin1';> cleanup.sql echo DELETE FROM `mptvdb`.`recording` WHERE '!FILENAME!' = `fileName`>> Cleanup.sql timeout /t 5 /nobreak "%MYSQL%" --user=root --password=MediaPortal < Cleanup.sql del /f /q "%%~dpi%%~ni.xml" del /f /q "%%~dpi%%~ni.jpg" del /f /q Cleanup.sql ) ) exit[/CODE] [/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