04-07-2020, 08:33 PM
Hi, I'm very new to python so this has been tough tying to figure this out. Really just been researching various forums and trying different examples by changing variables to see what worked.
After a few days of trying, I can add triggers to tasks and have a few that work (after pulling a lot of hair out) but this one has me stuck.
If you have a basic example that'd be great, I've tried some using different shutil copy scripts but they don't quite work right and they don't work when trying to trigger from a publish anyway.
UPDATE: I've been able to trigger a copy of a file to a test directory but now I just have to figure out how to get the file I just published and copy it over.
I used this:
import os
import shutil
files = ['c:\data000\D000.mov']
for f in files:
shutil.copy(f, '/home/tactic/assets/preview')
Question: How do I get files = [ "the file I just published"]
After a few days of trying, I can add triggers to tasks and have a few that work (after pulling a lot of hair out) but this one has me stuck.
If you have a basic example that'd be great, I've tried some using different shutil copy scripts but they don't quite work right and they don't work when trying to trigger from a publish anyway.
UPDATE: I've been able to trigger a copy of a file to a test directory but now I just have to figure out how to get the file I just published and copy it over.
I used this:
import os
import shutil
files = ['c:\data000\D000.mov']
for f in files:
shutil.copy(f, '/home/tactic/assets/preview')
Question: How do I get files = [ "the file I just published"]