INTERACT FORUM

Please login or register.

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

Author Topic: Complex batch file help?  (Read 1991 times)

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Complex batch file help?
« on: January 05, 2007, 09:59:06 pm »

I decided to pursue a quick and simple fix for my Xbox Media Center.

In order to view the thumbnails for my movies in XBMC, I need to duplicate my folder.jpg files.

They are stored in Video/Movies/*movie*/VIDEO_TS/folder.jpg
I need to copy them all (for all *movies*) from the VIDEO_TS/folder.jpg TO /folder.jpg

This will allow media center to keep working as it is now--which I can't get by removing the VIDEO_TS folder--and my Xbox Media Center will be able to pick up the folder.jpg files from the newly copied area.  Can a batch file be created to fix this?  It obviously needs to cycle through all the movie titles (folders).
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: Complex batch file help?
« Reply #1 on: January 08, 2007, 09:03:43 pm »

If you guys can't help, then I'm destined to about 2 hours of boring copying and pasting.  Please~!
Logged

NickM

  • Citizen of the Universe
  • *****
  • Posts: 630
  • Simplicity isn't always best, but it's easy to fix
Re: Complex batch file help?
« Reply #2 on: January 09, 2007, 12:34:42 am »

Please clarify the XBox destination folder...
Are the files to be renamed?
And are you using mapped drives or UNC?
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: Complex batch file help?
« Reply #3 on: January 09, 2007, 09:11:31 am »

It's really a simple file copy process but it's hard to explain.  It really doesn't matter what the reason for doing it is, either.  The point is, I absolutely know without a doubt that doing this will fix my problem because I've tried a few movies and it does fix the problem.

I have lots of folder.jpg's **denotes variable
Video/DVD Movies/*Movie Title*/VIDEO_TS/folder.jpg

All of those need to be copied to
Video/DVD Movies/*Movie Title*/folder.jpg

Notice the folder.jpg is originally inside the VIDEO_TS folder.  I need it to be copied one folder up, beside the VIDEO_TS folder.  Then, two identical folder.jpg files will exist for every movie.  Media Center automatically picks up the one under the VIDEO_TS folder and my Xbox Media Center automatically picks up the one next to the VIDEO_TS folder.  When I browse movies, it only looks one folder below the *Movie Title* for a jpg file so it has to be next to the VIDEO_TS folder.  XBMC doesn't bother looking inside the subfolder VIDEO_TS as well.  If I select the movie, the VIDEO_TS folder does have the correct thumbnail but I want the thumbnails to appear on all the Movie folders so it's easy to scroll through them all.

I hope this makes more sense.  I've already started manually copying but it would be good to know of a good program to do something like this.  It could almost be done with the cmd prompt in Windows but variables are the key.  It has to copy files (which is easy) but the filenames have to cycle through all available folders to complete the process.
Logged

skeeterfood

  • Citizen of the Universe
  • *****
  • Posts: 779
  • We're all just food for the skeeters.
Re: Complex batch file help?
« Reply #4 on: January 09, 2007, 01:42:15 pm »

If the folder.jpgs are imported into your library you can simply:
1) Select Images Mode
2) Type folder.jpg in the Search box
3) Select all the folder.jpg files
4) Library Tools->Find & Replace...
5) Click Select None button
6) Select Filename (path)
7) Find what: /VIDEO_TS/
8) Replace: /

-John
Logged

NickM

  • Citizen of the Universe
  • *****
  • Posts: 630
  • Simplicity isn't always best, but it's easy to fix
Re: Complex batch file help?
« Reply #5 on: January 09, 2007, 07:43:20 pm »

And, should you wish to do this outside MC, the batch file way, do as follows:-

First create a text file (using something like notepad) that has the following three lines
ifo
bup
vob

Save it as list.txt

Then open a command prompt and type (for example)
xcopy \\source\video\Diving_Sipadan_040903\*.* c:\temp\video /EXCLUDE:list.txt /s

The EXCLUDE switch excludes files in the list.txt file, and the /s copies all subdirectories (and files).  You may have to add some addtional lines to list.txt depending if you have other files in the VIDEO_TS source.

Logged

NickM

  • Citizen of the Universe
  • *****
  • Posts: 630
  • Simplicity isn't always best, but it's easy to fix
Re: Complex batch file help?
« Reply #6 on: January 09, 2007, 09:29:31 pm »

Just had another thought...  Rather than doing either of these ways, why not map the XBox drive and get MC to recognise it as a removeable drive, then create a playlist and auto-synchronise it???
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: Complex batch file help?
« Reply #7 on: January 10, 2007, 10:20:22 am »

Thanks for everyone's help.  I appreciate it.
Logged
Pages: [1]   Go Up