File structure - no season number in the filename

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
BennyB79 Offline
Junior Member
Posts: 5
Joined: May 2012
Reputation: 0
Post: #1
Hey I'm having a problem finding a regex amongst those published that will handle my file structure. I've never really used a media centre software before, just used the Windows file structure to locate my file and double click to launch.

My movies are fine, IMDB has picked those up okay.

TV Shows I'm having a problem with though. I've searched the forums for a regex that accounts for no season number in the filename but there doesn't seem to be one. My file structure is:

S:\Archived TV Shows\Burn Notice\Season 1\Episode 1 - Pilot.avi

for a double

S:\Archived TV Shows\Burn Notice\Season 1\Episode 20 - Second Last Episode & Episode 21 - Last Episode.avi

I also have:

S:\Current TV Shows\Burn Notice Season 5\Episode XX - Latest Episode.avi

Now, I realise I'll probably have to change the file structure for my current tv shows to be what I have for archived, no probs there but I can't find a regex that will handle a filename that doesn't have a season number in it. I thought this one would work:

<tvshowmatching>
<regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
</tvshowmatching>

but it hasn't. Anyone out there use my same file structure?
find quote
BennyB79 Offline
Junior Member
Posts: 5
Joined: May 2012
Reputation: 0
Post: #2
Okay, I kept searching while I was waiting to see if a response came in and I tried this one:


<advancedsettings>
<tvshowmatching>
<regexp>(?i)Season (\d{1,2}).*?(?i)Episode (\d{1,2})[^\\/]*</regexp>
</tvshowmatching>
</advancedsettings>

Seems to be working...I'll wait to see if it picks up the double episodes as well, but I don't think it will Sad

Thanks ITBoyKC who posted the solution in the thread I looked at.
find quote
digitaltomj Offline
Fan
Posts: 343
Joined: May 2011
Reputation: 1
Location: Miami
Post: #3
honestly...just do a batch file rename string and add the season and ep # (S01E01 -or- 1x01) it would be much simpler than what you are trying...with a batch string addition you can add the season number to an entire folder with one click...there are a bunch of batch rename software programs out there...I personally use Batch File Renamer
find quote