Custom submitter: How to turn a folder of files into a list of tasks

I’ve dipped a toe into automating some tasks here through a custom submitter script that submits a 1-task commandline job to the farm, which works great for what it is. However, now I’m setting my sights on some more ambitious processing tasks and need a little help knowing where to start.

I want to make a Deadline job that takes a list of files on the network and creates one task per file for a job that processes them from via command line. How do I get from Deadline’s apparent insistence that the Tasks for a commandline job differ only in their “frame” number to a job like:

  • Task 0: process \[path]\file.fbx
  • Task 1: process \[differentpath]\anotherfile.fbx
  • Task 2: process \[yetanotherpath]\yetanotherfile.fbx

etc?

Also, how do I approach writing to a single log file with information about each task?