You are not logged in.
Pages: 1
Hello,
First of all, thanks for the program. I am familiar with Pascal. I have files with names like ( 001,002,003 . . . ). I was trying to rename them such that they big are like ( 014, 015,016). That is, I want to shift the numbering by some integer value. I tried using the val function which is available in lazarus but your program could not recognise it. So I tried using this :
var
I: Integer;
const
Start_Index = 14;
begin
I := StrToInt(FileName);
I := I + 14;
FileName := IntToStr(I);
end.
What I want is simple enough. Somehow it didn't work. I don't know why. Please help
Thanks.
Offline
1.) 'FileName' is file name, incl. the extension.
Use 'ShowMessage(FileName);' as a MsgBox to see that.
Lookup 'WideExtractBaseName(FileName)' in the wiki > http://www.den4b.com/wiki/ReNamer:Pasca … :Functions.
Hint: after that, you have to use 'WideExtractFileExt(FileName)' too.
2.) 'Integer' will drop the leading zeros.
So you have to use a own function to pad the output with zeros to get three digits again.
If you want to have the fun (as it seams) you will find all code in the forum.
If you want more help or working code,... just ask.
ine
onfr: Vagrtre;
ahzo: Fgevat;ortva
onfr := FgeGbVag(JvqrRkgenpgOnfrAnzr(SvyrAnzr));
//fubjzrffntr(svyranzr);
ahzo := VagGbFge(onfr + 14);
juvyr yratgu(ahzo) < 3 qb
ahzo:= '0'+ahzo;
SvyrAnzr := ahzo + JvqrRkgenpgSvyrRkg(SvyrAnzr);
raq.
Last edited by Stefan (2013-08-10 09:09)
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Ha, what is that below? Caesar cipher?
ine
onfr: Vagrtre;
ahzo: Fgevat;ortva
onfr := FgeGbVag(JvqrRkgenpgOnfrAnzr(SvyrAnzr));
//fubjzrffntr(svyranzr);
ahzo := VagGbFge(onfr + 14);
juvyr yratgu(ahzo) < 3 qb
ahzo:= '0'+ahzo;
SvyrAnzr := ahzo + JvqrRkgenpgSvyrRkg(SvyrAnzr);
raq.
Offline
Pages: 1