Batch renaming of a collection of ISOs doesn't work very well, since there are some games that span multiple discs and some games that come in multiple versions. I suggest to support new escape sequences to handle these cases.
I understand that both the version and the disc number are not always wanted in the filename, so I propose the following:
A default string for disc number and version, i.e. " (Disc #)" and " (v1.##)"
An option to override it, using placeholders, i.e. --discnum-seq ' - Disc number %D -' and --discver-seq ' - Ver. %V -'
An escape sequence to always insert the disc number (or version) and another to add it only when non-zero (for example %d and %v vs %D and %V)
To explain a little bit better, let's suppose there are the following files in the current directory:
Game 1.iso
Game 2 d1.iso
Game 2 d2.iso
Game 3 (1.02).iso
The command wit MOVE -r . '%T%V%D.%E' will rename them to
Game 1 (v1.00) (Disc 1).iso
Game 2 (v1.00) (Disc 1),iso
Game 2 (v1.00) (Disc 2).iso
Game 3 (v1.02) (Disc 1).iso
while wit MOVE --discnum-seq ' ver. %V' --discver-seq ' disc %D' -r . '%T%d%v.%E' will lead to
Game 1.iso
Game 2.iso
Game 2 disc 2.iso
Game 3 ver. 1.02.iso
Ideally also the first disc of game 2 should have the disc number, but that would mean changing the behaviour of wit to check for other discs every time it finds a "disc 1", since disc 1 of a multi-disc game is indistinguishable from a single-disc game.
By specs the disc number is the 7th byte of the header, while the disc version is the following byte. The disc number starts at 0 for disc 1, while the version is usually indicated as 1.## where ## is the version byte (in decimal). For example a value of 0x01 corresponds to 1.01, while 0x0A to 1.10. I suggest to handle values greater than 99 by changing the first digit (for example 0x6B becomes 2.07).
I don't know if these two values are stored in other formats other than ISO, but I think so.
Thank you for your consideration and for this awesome tool.
Batch renaming of a collection of ISOs doesn't work very well, since there are some games that span multiple discs and some games that come in multiple versions. I suggest to support new escape sequences to handle these cases. I understand that both the version and the disc number are not always wanted in the filename, so I propose the following:
To explain a little bit better, let's suppose there are the following files in the current directory:
The command
wit MOVE -r . '%T%V%D.%E'
will rename them towhile
wit MOVE --discnum-seq ' ver. %V' --discver-seq ' disc %D' -r . '%T%d%v.%E'
will lead toIdeally also the first disc of game 2 should have the disc number, but that would mean changing the behaviour of wit to check for other discs every time it finds a "disc 1", since disc 1 of a multi-disc game is indistinguishable from a single-disc game.
By specs the disc number is the 7th byte of the header, while the disc version is the following byte. The disc number starts at 0 for disc 1, while the version is usually indicated as 1.## where ## is the version byte (in decimal). For example a value of 0x01 corresponds to 1.01, while 0x0A to 1.10. I suggest to handle values greater than 99 by changing the first digit (for example 0x6B becomes 2.07).
I don't know if these two values are stored in other formats other than ISO, but I think so.
Thank you for your consideration and for this awesome tool.