TACTIC Open Source
trigger to move files to different folder - Printable Version

+- TACTIC Open Source (http://forum.southpawtech.com)
+-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3)
+--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4)
+--- Thread: trigger to move files to different folder (/showthread.php?tid=91)

Pages: 1 2


RE: trigger to move files to different folder - Bassment - 04-14-2020

Thanks for the help, I got it to work last night. 
I changed shutil.copy to shutil.copyfile and published, and it copied over just like I needed.
I also removed relative_dir from the file_goes_to line so that it doesn't recreate the source  folder.
I'm thinking that it couldn't see the file without read permissions maybe?


RE: trigger to move files to different folder - listy - 04-16-2020

(04-14-2020, 02:12 PM)Bassment Wrote: Thanks for the help, I got it to work last night. 
I changed shutil.copy to shutil.copyfile and published, and it copied over just like I needed.
I also removed relative_dir from the file_goes_to line so that it doesn't recreate the source  folder.
I'm thinking that it couldn't see the file without read permissions maybe?
Can you show the result you want to achieve?
Like full final path


RE: trigger to move files to different folder - Bassment - 04-17-2020

My eventual goal is to be able to check in a quicktime or some kind of movie file .mov, .avi, .mp4 etc. Then have only the movie (not the thumbnail or preview image) copied over to a preview folder for the specific sequence and then be able to create a full length movie of all the files in that directory.

So basically:
File gets published to the project into the following directory naming:  projects/sobject.sequence_code}/{sobject.code}/{process}
projects/D000/D000_SC001/ANIMATION

Movie file is copied from there to a preview folder, into a sub folder for the sequence code. It also has to be able to overwrite any existing file (in case it’s not a versioned up file).
preview/D000/D000_SC001.mov

Then another script can take all of the .movs in that folder and write a .mov for the entire contents of the that folder using ffmpeg.
preview/D000/D000_SC001.mov
preview/D000/D000_SC002.mov
preview/D000/D000_SC003.mov
Combined file would be:  preview/D000/D000_ANIMATION.mov (or something like this)

So far the script you helped me with has done most of this with the exception of the sequence code variable and only writing the .mov without the thumbnails.
I’ve tried to add a line that says to ignore .jpg and .png during the copy process but I’m thinking maybe this has to happen when generating the file list.
And then I think I’d have to capture the sequence code when generating the list as well, and include this in the “file_goes_to” line.