Hello,
I am building a workflow in Alfred to copy a file with a Power Point template to a directory and name it based on a file I have selected through a universal action.
The idea I am employing can be seen in the following figure.
I am trying to perform the operations with a Python script, but for reasons I don't quite understand, sometimes the value of the file name is None and at other times the directory name is None. It's as if both variables cannot be read at the same time.
The python script code is
import sys
import os
import shutil
fileName = str(os.getenv("fileName"))
path = str(os.getenv("path"))
baseFilePath = "/Users/johnny.alvarado/Documents/CUB - MS DS/Template.pptx"
destinationFilePath = path + "/" + fileName + ".pptx"
#shutil.copy(baseFilePath, destinationFilePath)
sys.stdout.write(destinationFilePath)
configured as
The variable assignments
the debug results I get
Could someone guide me on how to solve this problem?
Environment information:
- Mac OS Sonoma 14.0
- Alfred 5.1.13
Thank you,
Johnny