Author |
Message |
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | Thanks, I will let you know how it works out!. |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | Ok, here is a script that converts your XML to CSV for BulkEdit.
It is expecting to find the data in JRiverXML.txt - I think you can see where to change that. It then creates a file JriverMovies.CSV - which you will give to BulkEdit
Copy and paste the following into "JRiver2CSV.wsf" or whatever name you want. Then run it by double click on the file. Good luck.
<job id="JRiver2CSV.wsf"> <script language="VBScript"> Dim filename If WScript.Arguments.Unnamed.Count > 0 Then filename = WScript.Arguments.Unnamed.Item(0) Else filename = "JRiverXML.txt" End If Dim infso, outfso, inf, outf, str, outstr, tmpstr Const ForReading = 1 Const ForWriting = 2 Set infso = CreateObject("Scripting.FileSystemObject") Set outfso = CreateObject("Scripting.FileSystemObject") If infso.FileExists(filename) Then Set inf = infso.OpenTextFile(filename, ForReading) Set outf = outfso.CreateTextFile("JRiverMovies.CSV", True) outf.writeline """title"",""location"",""notes""" outstr = "" Do While Not inf.AtEndOfStream str = inf.ReadLine If InStr (str,"<Field Name=""Filename"">") Then tmpstr = Replace(str, "<Field Name=""Filename"">", "") tmpstr = Replace(tmpstr, "</Field>", "") outstr = """[filepath]"+tmpstr+"[/filepath]""" End If If InStr (str, "<Field Name=""Name"">") Then tmpstr = Replace(str, "<Field Name=""Name"">", "") tmpstr = Replace(tmpstr, "</Field>", "") outstr = """"+tmpstr+""""+ ",file,"+outstr outf.writeline outstr outstr = "" End If Loop inf.Close outf.Close End If </script> </job> | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | I must be doing something wrong... I copied the file text into notepad and saved it as "JRiver2CSV.wsf", and when I double click on it nothing happens. If it is doing it silently... Where would it save the CSV file?
tia, Ron |
|
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | I got it to load the file... Now when I click in Bulk edit it is loading |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | Quoting ellisr63: Quote: I must be doing something wrong... I copied the file text into notepad and saved it as "JRiver2CSV.wsf", and when I double click on it nothing happens. If it is doing it silently... Where would it save the CSV file?
tia, Ron C'mon man, did you even read the post? You have to put your XML data into a file called "JRiverXML.txt" - it has to be in the same folder with the .wsf file. It was like the second sentence of my post ... And I got your PM - remember you are not trying to load the XML with BulkEdit - you are loading the CSV created by the script (if it works). | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | Did you see my second post? I reread the instructions and it is working so far. When it is done I will check and see how it came out. I appreciate your taking the time to get this to work for me. |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | Quoting ellisr63: Quote: I got it to load the file... Now when I click in Bulk edit it is loading Sounds good - does it load all 300? Remember, you will have only Title, Notes (with filepath in there) and 1 disc with the Location field filled in with the word "file", so that LoadDVD can play your media. If you needed any other data from JRiver, you have to tell me so I can update the script, and you can re-run it. In the future: - I will add JRiver to the direct XML import of BulkEdit - I will add automatic UPC matching, so that movie data is downloaded automatically, but I already explained why that is hard to do and will be imperfect, even when done. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | It is still loading... Any idea on how long it should take to load 300? |
|
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | JRiver also put my music videos in the file... Is there a way to have the script only do the ones that are in my HDMovies folder and not the music videos part? If not, no big deal. So far it is at 1% and it is showing over 100 in the collection. I can see where it is most likely best to run the script at night when everyone is sleeping. Thanks again for getting this to work! |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | Quoting ellisr63: Quote: JRiver also put my music videos in the file... Is there a way to have the script only do the ones that are in my HDMovies folder and not the music videos part? If not, no big deal. So far it is at 1% and it is showing over 100 in the collection. I can see where it is most likely best to run the script at night when everyone is sleeping.
Thanks again for getting this to work! Sure, just tell me how to identify which is which. Do I simply check for "HD Movies" in the filename and use only those? Sorry about the slowness of the import - I think if you click on the progress bar, you can interrupt it if you want. I think it must be past 1%, just the screen didn't refresh yet. I might have some old code that doesn't allow screen refresh during the loop. I'll check and fix that if necessary. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | It is at over 1400 so far, with 15% listed... I will just let it go until it hits the grand total. Strange thing is I didn't think I had more than around 300 music videos either. No big deal. | | | Last edited: by ellisr63 |
|
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | It is grabbing all my music too... not just my movies, and music videos. That explains why there are so many. |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | Seems like we are always cross posting. Can you answer my question about how to recognize just the ones you want? I can fix the script and yu can re-run it in far less time than waiting. Stop it by clicking on the progress bar. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: May 12, 2007 | Posts: 29 |
| |
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | Quoting ellisr63: Quote: I stopped it. And for the third time, how do I recognize just the ones you want? | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|
Registered: May 12, 2007 | Posts: 29 |
| Posted: | | | | They will only be in the path of "Tower/ My HD Movies". I sent you a download link for the 3 files, as I am not sure which ones you need. | | | Last edited: by ellisr63 |
|