Hi, y’all. Running Linux Mint and I have the puzzle presented above.

From what I gather, I’m using rename (1p) which makes mention of Perl and in the man page it says it will also run as file-rename. I’m not sure if this is the right rename utility for the common argument

s/old_pattern/new_pattern/

but any time I try to run anything (including -n), I just get an angle bracket > and have to ctrl-c out.

I’d also need some details on how the wildcards work, which seems to be lacking in the documentation.

Edit: Instructions unclear. I have a bunch of episodes that are very wordy. I’m moving them onto DVD and truncated on my player the directory will look like:

Star Trek The Next Gene…
Star Trek The Next Gene…
Star Trek The Next Gene…
Star Trek The Next Gene…
Star Trek The Next Gene…

so I want to take (sample episode)

Star Trek The Next Generation Season 1 Episode 1 - Encounter at Far Point

and

  • Replace 'Star Trek The Next Generation Season ’ with ‘S0’

  • Replace 'Episode ’ with ‘E0’ or ‘E’ depending on digits

  • Keep episode title as is.

So it looks like

S01E01 - Encounter at Farpoint.mkv

  • ulkesh@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    13 hours ago

    This doesn’t answer your question at all, so my apologies up front.

    I’m not at all intending to advertise here, and I’m not at all affiliated with them, but in the past, I’ve sidestepped having to write scripts by using FileBot. It’s always just worked for me.