You are not logged in.
Pages: 1
Hello, compliments for your project "ReNamer".
It is possible to sum a value?
Example: I have this file name:
09109101.tif
09109107.tif
09109118.tif
09109121.tif
09109191.tif
I would to sum the value 33 on last three right characters so the result is:
09109134.tif
09109140.tif
09109151.tif
09109154.tif
09109294.tif
Thanks
P.S.
I do not have understand how to rename only directory names and subdirectory (no file name)
Offline
Thanks
For your task, use PascalScript rule with the script below.
NOTE: Don't forget to sort by name in the REVERSE order, otherwise you might get collisions when you start renaming.
const
ADD = 33;
var
Value: Integer;
Base, Ext: WideString;
function PadLeft(N, Len: Integer): string;
begin
Result := IntToStr(N);
while Length(Result) < Len do
Result := '0'+Result;
end;
begin
Ext := WideExtractFileExt(FileName)
Base := WideExtractBaseName(FileName)
Value := StrToIntDef(Base, -1);
if Value > 0 then
begin
Base := PadLeft(Value+ADD, Length(Base));
FileName := Base + Ext;
end;
end.
Offline
If you want to rename just directories (folders), open "Filter Settings", and use option "Add folders as files".
Offline
Thanks!!
Offline
Pages: 1