> the part that I can't figure out is how to make the directory path dynamic
Ahh, welcome to the world of paths in AppleScript :)
For various historical/legacy/unknown(?) reasons, there are multiple ways of identifying directories in AppleScript. Not all of them work in all cases, so you need to know not only which directory you want, but also which application you'll be targeting when you use it.
For reference, the four common ways are:
alias - a 'universal' directory item - can point to any disk item (file, directory, etc.) and is persistent (e.g. if you create an alias to an item, and that item is subsequently moved or renamed, the alias object still references it correctly). Aligned with, but not related to Finder aliases.
path - a simple text object defining the path to a file in MacOS/HFS path (e.g. "Macintosh HD:Users:Username:Documents:some.jpg")
POSIX path - similar to path above, but using UNIX-style paths (e.g. "/Users/Username/Documents/some.jpg", or "~/Documents/some.jpg"
Finder references - somewhat verbose format of the path, e.g. File "some.jpg" of folder "Documents" of folder "Username" of folder "Users" of volume "Macintosh HD". Finder references actually have a lot of other metadata attached to them so they can be useful if you're manipulating files based on that.
You can also use the 'path to' command to dynamically find common folders, such as the user's home directory (path to home folder), Documents folder (path to documents folder) and more).
Finder references only work in the Finder, but the various methods can be coerced to each other, for example:
tell application "Finder"
file "some.jpg" of (path to home folder) --> finder file object
file "some.jpg" of (path to home folder) as text --> "Macintosh HD:Users:username:some.jpg"
POSIX path of (file "some.jpg" of (path to home folder) as text) --> "/Users/username/some.jpg"
end tell
> For the sake of simplicity in the question the folder just lived in a generic desktop folder, but if I wanted to make it nested I can't figure out how to set it to the correct path
In my AppleScript example, I'm using Finder objects, so you can just prepend to get to where you want to go. Therefore, instead of:
set base_folder to folder "Capture" of (path to desktop)
you could say:
set base_folder to folder "subfolder" of folder "anotherfolder" of folder "Capture" of (path to desktop)
You can also coerce back from a POSIX file to a Finder object if you have it in POSIX form, but given your example it's probably easier to say:
set base_folder to folder "Capture" of folder "sbx digital jobs" of (path to home folder)
Since the Finder inherently supports spaces in filenames, you don't need to get into escaping spaces and other characters.
hth