You are not logged in.
Pages: 1
I have 9000 survey photos of the KP is by 9m, All images need renaming with +9 to the KP no. Got stuck with this.
KP_4.293 202509212151573 Field Joint DVR-4364_Ch4 (e.g _KP4.302 202509212151573 Field Joint DVR-4364_Ch4)
KP_4.303 202509212152543 Anode DVR-4364_Ch1
KP_4.303 202509212152543 Anode DVR-4364_Ch2
KP_4.303 202509212152543 Anode DVR-4364_Ch4
KP_4.305 202509212153083 Field Joint DVR-4364_Ch1
KP_4.305 202509212153083 Field Joint DVR-4364_Ch2
KP_4.305 202509212153083 Field Joint DVR-4364_Ch4
Offline
There is no easy rule to do that yet, but this can be done with a bit of Pascal Script in ReNamer.
Basically, it finds the first number between a dot and a space, and adds 9 to it.
var
StartPos, EndPos, Number: Integer;
NumberStr: String;
begin
StartPos := WidePos('.', FileName);
if StartPos > 0 then
begin
EndPos := WidePosEx(' ', FileName, StartPos + 1);
if EndPos > 0 then
begin
NumberStr := WideCopy(FileName, StartPos + 1, EndPos - StartPos - 1);
if TryStrToInt(NumberStr, Number) then
begin
Number := Number + 9; // Adjust the number here
WideDelete(FileName, StartPos + 1, EndPos - StartPos - 1);
WideInsert(IntToStr(Number), FileName, StartPos + 1);
end;
end;
end;
end.The resulting filenames will be:
KP_4.302 202509212151573 Field Joint DVR-4364_Ch4
KP_4.312 202509212152543 Anode DVR-4364_Ch1
KP_4.312 202509212152543 Anode DVR-4364_Ch2
KP_4.312 202509212152543 Anode DVR-4364_Ch4
KP_4.314 202509212153083 Field Joint DVR-4364_Ch1
KP_4.314 202509212153083 Field Joint DVR-4364_Ch2
KP_4.314 202509212153083 Field Joint DVR-4364_Ch4
Offline
Thanks, i dont know Pascal, i will try with Python...
Offline
Thanks, i dont know Pascal, i will try with Python...
You don't actually need to know Pascal, you just need to copy and paste the script into the Pascal Script rule in ReNamer.
This script is fairly straightforward and I'm sure you won't have any problems understanding it if you give it a read.
Offline
Pages: 1