You are not logged in.
Pages: 1
I want to delete the first 2 numbers in a filename so as to make the list of filename entries uniform.
FROM: 1978_001 - Bee Gees - Night Fever (192S - 3.31)
TO: 78_001 - Bee Gees - Night Fever (192S - 3.31)
How?
Thanks, Don
Offline
Hi Don
If you simply want to delete first 2 character, you can use Delete rule, and set it to delete from position 1 until count 2.
But if you want to remove first 2 characters ONLY if they are digits, then you need to use this script in the PascalScript rule:
begin
if IsWideCharDigit(WideGetChar(FileName, 1)) and
IsWideCharDigit(WideGetChar(FileName, 2))
then WideDelete(FileName, 1, 2);
end.
Offline
You can use a RegEx rule as well:
Expression: ^\d\d(.+)
Replace: $1
And this freedom of choice is that what makes ReNamer so wonderful and powerful tool.
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
krtek, You are resurrecting a thread which is almost 2 years old
By the way, with the latest version of ReNamer, script should be as follows:
begin
if IsWideCharDigit(FileName[1]) and
IsWideCharDigit(FileName[2])
then WideDelete(FileName, 1, 2);
end.
Offline
Pages: 1