INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: SideCar update issue  (Read 1094 times)

mlagase

  • World Citizen
  • ***
  • Posts: 114
SideCar update issue
« on: August 28, 2011, 09:17:42 am »

I have recently changed the name of the share of where my movies are and have reimported all of videos in to the library. When I now view the Filename value in each of the sidecar XML files they are pointing to the old location. How can I get this updated for all of my files without having to manually update each XML file?

I've tried the option of Update Library from Tags and this did not seem to do this trick.

I would have expected MC to be smart enough to detect the change and then update all of the sidecar files accordingly.
Logged

Lasse_Lus

  • Citizen of the Universe
  • *****
  • Posts: 999
Re: SideCar update issue
« Reply #1 on: August 28, 2011, 10:47:02 am »

Library Tools --> Rename, Move & Copy Files --> Update Database to point to new location...
Logged
MT5FR

mlagase

  • World Citizen
  • ***
  • Posts: 114
Re: SideCar update issue
« Reply #2 on: August 28, 2011, 10:53:05 am »

I had already reimported the movies so the filename location in the MC database is correct, it is only the sidecar files that are still showing the old location. I have data in the XML files that I don't want to lose so I don't believe the Rename Move and Copy files will work in this instance because I had deleted the information from the MC database and reimported everything.

Do I need to find a utility that will go in to each sidecar file and update the path to the correct one?
Logged

mlagase

  • World Citizen
  • ***
  • Posts: 114
Re: SideCar update issue
« Reply #3 on: August 28, 2011, 11:33:48 am »

I was able to do this with Powershell using a search a replace function that I wrote.

$Files = Get-ChildItem -path \\Media\Movies -filter *JRSidecar.xml -recurse
foreach ($File in $Files)
{
   $Contents = Get-Content $File.Fullname
   $contents | foreach-object {$_ -replace '\\\\media\\G\\DVDMovie','\\Media\Movies'} | set-Content $file.Fullname
}

Thanks,

Mike
Logged
Pages: [1]   Go Up