NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 13 14 15 16 17 … 56 Next »
updated recoverrecordings.bat

 
  • 0 Vote(s) - 0 Average
updated recoverrecordings.bat
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#11
2008-11-14, 01:16 PM (This post was last modified: 2008-12-10, 03:15 AM by pBS.)
i made a batch that can alter the paths in the xml file...so i'll get started incororating it into the main script so you can adjust the path when you build a dump..Big Grin
[paths are hardcoded into the metadata.xml so sometimes need altering]

here's a batch that can adjust the paths afterwards:
run: Alterxml.bat recording-dump.xml
Remember to adjust paths in bold inside first!

Code:
@echo off cls set output=%cd%\out.xml [b]set oldpath=e:\mpg set newpath=\\pvr\e\mpg[/b] setlocal ENABLEDELAYEDEXPANSION del %output% 2>NUL for /f "usebackq tokens=1,2,3,4,* delims=<> " %%f in ("recording-dump.xml") do ( set newname= set tag1= set tag2= set tag01= rem set a var to incoming <tag>data so we can replace filepath. [cannot do with %x vars,only %x%] set newname=%%h rem only set if there is a value here. replaces oldpath with newpath. if not "%%h" == "" set newname=!newname:%oldpath%=%newpath%! if not "%%g" == "" set tag1=%%g if not "%%i" == "" set tag2=%%i rem remove spaces from leading tags. set tag01=%%f set tag01=!tag01: =! rem call export functon to write out data with added "<>". [the tricky part] call :exportxml "!tag01!" "!tag1!" "!newname!" "!tag2!" rem pause ) echo Done! goto :eof :exportxml if not "%~3%~4" == "" echo ^<%~2^>%~3^<%~4^> if "%~1%~3%~4" == "" echo ^<%~2^> if "%~2%~3%~4" == "" echo ^<%~1^> rem check for single tags and output appropriately while adding <>'s. if not "%~3%~4" == "" echo ^<%~2^>%~3^<%~4^> >> %output% if "%~1%~3%~4" == "" echo ^<%~2^> >> %output% if "%~2%~3%~4" == "" echo ^<%~1^> >> %output% goto :eof
adjust the newpath and oldpath at the top and run in same dir as your recording-dump.xml
carefull as the oldpath is case sensitive, but you can run this multiple times on same file to adjust for multiple source dirs..Smile [or differing case]
EDIT: forgot i could use ^ to escape those problem characters so simplifies things a bit..may rewrite it based on that..lol
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  UK Freeview & Freesat Channel Logos (Updated) Lao Pan 68 52,010 2026-07-07, 09:38 PM
Last Post: sub
  Blue-Retro-SHV Skin updated Jaggy 55 34,814 2018-01-09, 12:52 AM
Last Post: Jaggy
  AutoRefresh Updated (27th Oct 2013) imilne 0 2,603 2013-10-27, 02:43 PM
Last Post: imilne
  AutoRefresh - Updated 21st December, 2012 imilne 0 2,816 2012-12-21, 02:55 PM
Last Post: imilne
  System - Updated 19th December, 2012 imilne 0 2,835 2012-12-19, 08:38 PM
Last Post: imilne
  AutoRefresh - Updated 13th April, 2012 imilne 0 2,525 2012-04-13, 07:36 PM
Last Post: imilne
  System - Updated 25th February, 2012 imilne 0 2,329 2012-02-25, 11:11 AM
Last Post: imilne
  AutoRefresh - Updated 18th February, 2012 imilne 0 2,099 2012-02-18, 10:04 AM
Last Post: imilne
  SubMenu - Updated January 23rd, 2012 imilne 0 2,010 2012-01-23, 09:52 AM
Last Post: imilne
  New wiki entry: RecoverRecordings pBS 11 5,469 2010-01-29, 08:16 AM
Last Post: pBS

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode