- September 1, 2008
- 21,577
- 8,224
- Home Country
- New Zealand
https://dev.mysql.com/doc/refman/5.7/en/show-warnings.htmlI don't understand what I can do further.
https://dev.mysql.com/doc/refman/5.7/en/show-warnings.htmlI don't understand what I can do further.
Please do not use PM. There is nothing private in this conversation. If you go private, you prevent other people from following and learning.Can you send me a PN in german and give me some hints?
That was my idea. Unfortunately "load_file" seems to have a problem if "fileName" has special characters like german Umlauts.The leading thought to make this conversation private was that no one has interest to my speciale problem. I thought. But you are right. Maybe someone is out there
maybe you had the same idea as I have now. I have a batch file that can delete all XML files, jpg files, txt files and so on where no corresponding ts files exists.
So I will test this:
1. I delete all XML files where no corresponding ts file exists.
2. I open the recording table and use this command: select replace('filename','.ts','.xml');
3. Then I use this command: DELETE FROM Recording WHERE LOAD_FILE(fileName) IS NULL;
4. Then I use this command: select replace('filename','.xml','.ts');
I will tell you about the result.
Or did you had another idea, mm1352000?
Yes, I am interested in a batch script to do this. Like you, I run my own batch script to re-arrange recordings (move them to appropriate locations in the "Videos" section), but I have to remember to start MP and manually use the "Clean Up" function. A neater solution would be for my script to issue some command to perform the clean up.The leading thought to make this conversation private was that no one has interest to my speciale problem. I thought. But you are right. Maybe someone is out there
@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