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 File Archive
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="Lightning303" data-source="post: 1059571" data-attributes="member: 97876"><p>Hey,</p><p>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.</p><p></p><p>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.</p><p></p><p>Batch Scripts:</p><ul> <li data-xf-list-type="ul">- Allow to start a batch file only once a day [spoiler]<br /> [CODE]@echo off <br /> set LastDate=C:\LastDate.txt <br /> set TempDate=C:\Date.tmp <br /> <br /> if exist %TempDate% exit<br /> <br /> echo %date%>%TempDate%<br /> fc %TempDate% %LastDate% >nul<br /> if %ERRORLEVEL%==1 goto NewDay<br /> goto End<br /> <br /> :NewDay <br /> :: What to do<br /> <br /> :End<br /> move %TempDate% %LastDate%<br /> exit[/CODE]<br /> [/spoiler]</li> <li data-xf-list-type="ul">- Backup Files (e.g. Mediaportal Databases) [spoiler]<br /> [CODE]:: Backing up everything from D:, and keeping the backups for 7 days.<br /> xcopy D:\*.* D:\temp\ /y/q<br /> FOR /F "tokens=1,2 delims=:" %%d IN ('date /t') DO set dat=%%d<br /> FOR /F "tokens=1,2 delims=:" %%i IN ('time /t') DO set zeit=%%i-%%j<br /> rename D:\temp "Backup %dat%%zeit%"<br /> FOR /F "skip=7 tokens=*" %%c IN ('DIR /O-D /B D:\"Backup *"') DO (rd D:\"%%c" /s/q)[/CODE]<br /> [/spoiler]</li> <li data-xf-list-type="ul">- Start WebGrab++ and keep TVServer from going crazy [spoiler]<br /> [CODE]"C:\Program Files (x86)\ServerCare\WebGrab+Plus\WebGrab+Plus.exe"<br /> xcopy "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\temp.xml" "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml" /Y[/CODE]<br /> [/spoiler]</li> <li data-xf-list-type="ul"><a href="https://forum.team-mediaportal.com/threads/batch-file-archive.124361/#post-1060125" target="_blank">Comskip</a> by @[USER=103159]eisblock[/USER]</li> <li data-xf-list-type="ul"><a href="https://forum.team-mediaportal.com/threads/batch-file-archive.124361/#post-1070255" target="_blank">Copy ClearArt and ClearLogos to Mediaportal folders</a> by @[USER=92134]ixdvc[/USER]</li> <li data-xf-list-type="ul"><a href="https://forum.team-mediaportal.com/threads/batch-file-archive.124361/#post-1070255" target="_blank">Backup local fanart</a> by @[USER=92134]ixdvc[/USER]</li> </ul></blockquote><p></p>
[QUOTE="Lightning303, post: 1059571, member: 97876"] 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: [LIST] [*]- Allow to start a batch file only once a day [spoiler] [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[/CODE] [/spoiler] [*]- Backup Files (e.g. Mediaportal Databases) [spoiler] [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)[/CODE] [/spoiler] [*]- Start WebGrab++ and keep TVServer from going crazy [spoiler] [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[/CODE] [/spoiler] [*][URL='https://forum.team-mediaportal.com/threads/batch-file-archive.124361/#post-1060125']Comskip[/URL] by @[USER=103159]eisblock[/USER] [*][URL='https://forum.team-mediaportal.com/threads/batch-file-archive.124361/#post-1070255']Copy ClearArt and ClearLogos to Mediaportal folders[/URL] by @[USER=92134]ixdvc[/USER] [*][URL='https://forum.team-mediaportal.com/threads/batch-file-archive.124361/#post-1070255']Backup local fanart[/URL] by @[USER=92134]ixdvc[/USER] [/LIST] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
HTPC Projects
Software
Tools and other software
Batch File Archive
Contact us
RSS
Top
Bottom