← All CDT Flashcard Decks

Automation & Scripting Flashcards

7 cards from real CDT practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Automation & Scripting flashcards as text
  1. Which scripting approach is BEST for automating repetitive document conversions across hundreds of files in a watch folder?

    Answer: An event-driven script that monitors the folder and triggers conversion on new file arrival

    Event-driven folder-watch scripts process files immediately upon arrival, making them ideal for high-volume unattended conversion pipelines.

  2. In a document automation script, what is the purpose of a 'template variable' or 'merge field'?

    Answer: To act as a placeholder that is replaced with dynamic data at runtime

    Template variables are placeholders (e.g., {{CustomerName}}) that the scripting engine replaces with actual data when generating the final document.

  3. A Zonal OCR script reads invoices but misidentifies the vendor name when the logo shifts position between vendors. What is the MOST appropriate fix?

    Answer: Switch from fixed-zone OCR to anchor-relative or AI-based field extraction

    Anchor-relative extraction locates a field relative to a nearby text anchor (e.g., 'Vendor:') rather than an absolute page coordinate, handling layout variation.

  4. When automating PDF form data extraction with a script, which data format is most commonly used to export the collected field values for downstream processing?

    Answer: FDF or XFDF

    FDF (Forms Data Format) and XFDF (XML Forms Data Format) are the standard PDF specifications for exporting and importing form field values.

  5. A document workflow script must apply a Bates stamp to each page of a multi-volume legal set, continuing the sequence across volumes. Which programming concept is essential?

    Answer: Persistent counter state shared or passed between script runs

    Bates numbering must be sequential across volumes, so the script must persist the last-used counter (in a file, database, or argument) and resume from it for each new volume.

  6. Which regular expression pattern would correctly match a US Social Security Number in the format NNN-NN-NNNN for redaction automation?

    Answer: \d{3}-\d{2}-\d{4}

    \d{3}-\d{2}-\d{4} matches exactly three digits, a hyphen, two digits, a hyphen, and four digits — the standard SSN format.

  7. In document automation, what does 'idempotency' mean for a script that publishes documents to a content repository?

    Answer: Running the script multiple times produces the same end state without unintended duplicates or side effects

    An idempotent script can be safely re-run (e.g., after a failure) because it checks existing state and only makes changes that are still needed, avoiding duplicates.