Mass Changing of URLs

If you need help on how to use the program
Post Reply
Cojun
Posts: 4
Joined: 2009-08-21 10:00:14
Location: Germany

Mass Changing of URLs

Post by Cojun »

Hey,

i change to a new Fileserver and each movie in my Ant Movie Catalog should become a new URL.
Is there a way to mass change the URLs in AMC in one run like regexp or so?

Example:

if URL contains \\192.168.0.219 change it to \\192.168.0.218

Thank you

Daniel
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

You can use a little script to do this:

Code: Select all

program ReplaceString;
const
  oldValue = '192.168.0.219';
  newValue = '192.168.0.218';
var
  value: string;
begin
  value := GetField(fieldURL);
  value := StringReplace(value, oldValue, newValue);
  SetField(fieldURL, value);
end.
Cojun
Posts: 4
Joined: 2009-08-21 10:00:14
Location: Germany

Post by Cojun »

Hey ...
Thank you very much for the fast answer.
And please ... what is to do to integrate that script?
I am not familiar with this technique.
Can you please give me a short step by step help?

Thank you very much

Daniel
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Go to Tools -> Scripting, be sure that "movies to include" is set to "all" (or "selected" if you have first selected which movie you want to modify)
Then in the toolbar click "Editor" and the "new" icon.
Paste the script, click Run.
Cojun
Posts: 4
Joined: 2009-08-21 10:00:14
Location: Germany

Post by Cojun »

Heya,

sounds simple.
Will test it when the transfer from the old machine to the new one is finised and will keep you updated.

Thanks for the great support. Its then time for a PayPal-Donation.

Thank you again

Daniel
Post Reply