I've got a series of files called Voyager - 3xx -EpisodeName.avi that need renaming to Voyager.S03Exx.EpisodeName.avi to make my DLNA server happy.
Any cmd line guru's able to come up with anything?
Si

I've got a series of files called Voyager - 3xx -EpisodeName.avi that need renaming to Voyager.S03Exx.EpisodeName.avi to make my DLNA server happy.
Any cmd line guru's able to come up with anything?
Si

If this is just a one-off, I would probably use Renamer.
![]()
SimpleSi (14th April 2011)

Are the episode names in any format, or any length etc? You could do wildcard renames in CMD, but easiest ways all have fixed lengths of wildcards, which I'm guessing you don't?
Could try to knock up a vbs version, or try to fix CMD, but our networks going offline today for repairs, so don't know how much time I'll have during day :P (or shout if you're using Renamer and I wont knock one)
Steve

@Arthur
Lovely find - just the job
Still like to know if there's a proper geeks way of doing it in XP cmd line though
Simon

Well, it's not elegant, but it should work....
You could probably get it down to a one-liner if you did a FOR /F tokens..... in (dir /b Voyager*) rename etc.Code:SETLOCAL ENABLEDELAYEDEXPANSION for /L %%e in (1,1,99) do call :renfile %%e goto :eof :renfile set e=%1 if %e% LSS 10 ( set episode=0%e% ) else ( set episode=%e% ) rename "Voyager - 3%episode% -EpisodeName.avi" "Voyager.S03E%episode%.EpisodeName.avi"
Last edited by jinnantonnixx; 14th April 2011 at 09:53 AM.
SimpleSi (14th April 2011)

Do you reckon this PowerShell script is geeky enough?
Edit. Need to figure out a way to do something similar to what Jinnantonnixx did with the series and/or episode numbers.Code:$regex = "^(Voyager)(?:\s-\s)(\d{1,2})(\d{2})(?:\s-)(.*)\.(\w{3})$" Get-ChildItem -filter *.avi | Where-Object { $_.Name -match $regex } | Rename-Item -NewName { $_.Name -Replace $regex, "`$1.S0`$2E`$3.`$4.`$5" }
Last edited by Arthur; 15th April 2011 at 08:58 AM.
SimpleSi (15th April 2011)
I have a similar problem;
Rename: 'Artist Name - Show Name.mp3' to 'Artist Name @Artisttwitter - Show Name.mp3'
Can anyone help please?

There are currently 1 users browsing this thread. (0 members and 1 guests)