File Mover Blog

April 14, 2025

How to include pdf page count next to the filename after moving

Q: Could you assist, can I include a PDF page count next to the filename after moving PDFS in my Rule Events email notification. Also a total number of files. Thank you for your time.

A: Yes this is posible using some Pascal Script.

  • We used a Windows folder as Source

limagito file mover windows folder as source

  • File Filter Setup:
    • We only want to move pdf files ( *.pdf )

limagito file mover file name include filter

  • Pascal Script Setup:

limagito file mover pascal script

    • Enable and add the following ‘On Rule Begin’ script:  link
      • psVIA := 0; will set the Integer parameter %VIA to zero
      • psVSA := ”; will clear the String parameter %VSA

limagito file mover include pdf page count

  • Rule Events Setup:

limagito file mover rule events

    • Enable ‘On Success’ event and enable ‘Enable Mail’
    • In the Mail setup we’ll use the parameters %VSA and %VIA
      • %VSA will contact the filename and page count
      • %VIA will contain the total number of files

limagito file mover rule events email setup

    • Don’t forget to enable ‘Trigger mail event after scan’ because we want a single email ofter the move is done:

limagito file mover rule events options

  • Function Setup:
    • Enable ‘Exit Cyclus on Error’ because the second Destination (Pascal Script) should not be executed when the move of a source file is not successful.

limagito file mover function setup

  • Destination Setup:
    • First Destination must be the actual Desination of the Source Files, in our case a Windows folder
    • Second Destination is a Pascal Script which will count the total number of files successfully moved and will keep track of the pages of each pdf file.
      • This info is used in the Rule email event.

limagito file mover destination setup

limagito file mover windows folder as destination

    • Add the following ‘Destination’ Pascal Script:  link

limagito file mover pascal script as destination

  • RunTime Log Result:

limagito file mover runtime log result

  • Email Result:

limagito file mover include pdf page count email result

If you need any help with this ‘include pdf page count’ request, please let us know.

Best Regards,

Limagito Team

#managedfiletransfer #filetransfer #filemanagement

By Limagito-Team PDF , Share:
SEARCH