A-PDF :: Affordable PDF Tools

Can I extract first letter to rename PDF files?

Return KB main page

Question

How to simple write script to extract first letter to rename PDF files?

Solution

With A-PDF Rename (free download here), you can follow below steps:

  1. Add PDF Documents: select "File->Add PDF Document";
  2. Choose "Rename Method->Advanced", then input script as follows:

    function GetShortName(fname:string):string;
    var
    p:Integer;
    tmpstr:string;
    begin
    Result:='';
    tmpstr:=Trim( fname)+' ';
    p:= Pos(' ',tmpstr);
    while p>1 do
    begin
    Result:= Result+copy(tmpstr,1,1);
    tmpstr:=Copy(tmpstr,p+1,Length(tmpstr)-p);
    p:= Pos(' ',tmpstr);
    end;
    end;
    begin
    newfilename:=GetShortName(filename);
    end.

  3. Click "Rename" to change name by your scirpt.

This web tutorial will give you an overview of the procedure how easy to use this product!

tutorial

Or view video tutorial here:

a-pdf-rename-video-tutorial-image

order

More Related Q&A

Related products

  • A-PDF Scan Optimizer - batch optimize your scanned PDF documents
  • A-PDF Text Replace - batch replace, change or delete multiples text in Acrobat PDF files automatically
  • A-PDF Rename - batch rename multiple PDF document based on content, metadata and file attributes(Size, Datetime) within PDF files. You can batch change or update multiple PDF files metadata (title, creator, producer, author, subject and keywords) as well as
  • A-PDF Page Master - Manage and organize PDF document pages, including edit, arrange, merge, extract etc.

We always like improving our products based on your suggestions. Please send your feedback (or ask questions) to us in the contact page.

Return KB main page