- September 12, 2009
- 798
- 577
- Home Country
- Germany
Hey,
im running small batch files on my HTPC on resume to handle stuff like backups and starting epg grabbing. I thought i would share them. Also i think its a nice idea to start a thread where everybody can share their batchfiles, so when somebody is looking for a specific solution they can find it here.
I hope others will add their batch scripts here aswell, and i will then link them directly in this post. Please dont add them as files, but as text in code tags.
Batch Scripts:
im running small batch files on my HTPC on resume to handle stuff like backups and starting epg grabbing. I thought i would share them. Also i think its a nice idea to start a thread where everybody can share their batchfiles, so when somebody is looking for a specific solution they can find it here.
I hope others will add their batch scripts here aswell, and i will then link them directly in this post. Please dont add them as files, but as text in code tags.
Batch Scripts:
- - Allow to start a batch file only once a day
Code:
@echo off set LastDate=C:\LastDate.txt set TempDate=C:\Date.tmp if exist %TempDate% exit echo %date%>%TempDate% fc %TempDate% %LastDate% >nul if %ERRORLEVEL%==1 goto NewDay goto End :NewDay :: What to do :End move %TempDate% %LastDate% exit
- - Backup Files (e.g. Mediaportal Databases)
Code:
:: Backing up everything from D:, and keeping the backups for 7 days. xcopy D:\*.* D:\temp\ /y/q FOR /F "tokens=1,2 delims=:" %%d IN ('date /t') DO set dat=%%d FOR /F "tokens=1,2 delims=:" %%i IN ('time /t') DO set zeit=%%i-%%j rename D:\temp "Backup %dat%%zeit%" FOR /F "skip=7 tokens=*" %%c IN ('DIR /O-D /B D:\"Backup *"') DO (rd D:\"%%c" /s/q)
- - Start WebGrab++ and keep TVServer from going crazy
Code:
"C:\Program Files (x86)\ServerCare\WebGrab+Plus\WebGrab+Plus.exe" xcopy "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\temp.xml" "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml" /Y
- Comskip by @eisblock
- Copy ClearArt and ClearLogos to Mediaportal folders by @ixdvc
- Backup local fanart by @ixdvc
Last edited: