You are not logged in.
Pages: 1
Hello,
I have several hundred text files. The contents of all files starts with (variable) three-digit number, and this number should be extracted and used to rename a file to be like "[number].txt".
Is there a way to do it in Renamer. I presume I would need PascalScript rule.
Please help.
Merco
Offline
Hi and welcome Merco,
you could take a look at our wiki and see if you could figure it out yourself:
ReNamer:Rules:PascalScript
ReNamer:Pascal_Script:Read_file_content
function FileReadFragment(const FileName: WideString; Start, Length: Integer): String;
begin
FileName := '[' + FileReadFragment(FilePath, 0, 3) + '].txt';
end.
Else just ask for more help.
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
Hello Stefan,
Thanks for the welcome.
And thank you very much for the PascalScript. It works!
It has renamed all files as I expected, giving them names from the first three letters in the text (three bytes), and my application works now.
Great tool!
Merco
Offline
Pages: 1