ReNamer:Pascal Script - den4b Wiki (original) (raw)

The PascalScript Rule in ReNamer uses Pascal Script component to allow users to program their own renaming rule.

To master Pascal Script, follow these steps:

  1. Learn the basic syntax and concepts of Pascal Script
  2. Understand the specific variables, procedures and functions that are defined within ReNamer
  3. Learn how to use these variables/functions/procedures in scripts

Let us see these steps in more details.

Learn the basics

To learn the basics of Pascal Script, please refer to the Pascal Script Quick Guide.

Types and functions

In this section, we will see all types, procedures and functions which can be used within ReNamer.

Note: Most of these are not part of the "standard" Pascal Script, so you may not find them in other applications.

Script cookbook

In this section, we will see how to write scripts for some common renaming tasks.

They also demonstrate how to use ReNamer's types, procedures and functions.

  1. How to rename a file (using the FileName variable)
  2. How to skip extention (basic FileName utilities)
  3. How to convert the filename to ALLCAPS (the WideUpperCase function)
  4. How to operate on words (Unicode string-handling routines)
  5. How to serialize files (basic conversion routines)
  6. How to initialize variables
  7. How to create interactive dialogs
  8. How to work with folders and paths (FilePath constant)
  9. How to break the script execution
  10. How to read file content
  11. How to import functions
  12. How to split file path into parts (folders, base, extension)
  13. How to store/load variables for later reuse

Scripts repository

Study them and adopt them for your purpose.

Tips

A few quick tips:

Warnings:

Developers of the Pascal Script component.

Help and reference for the fundamentals of the Delphi/Pascal language.