private void CreateDirectories()
        {
            bool          success        = true;
            List <string> directoryPaths = new List <string>();

            // main production folder (e.g. "render_temp\productions\virtualcampaign\12345")
            directoryPaths.Add(ProductionPathHelper.GetLocalProductionDirectory(production));

            //motif folder (e.g. "render_temp\productions\virtualcampaign\12345\motifs")
            directoryPaths.Add(ProductionPathHelper.GetProductionMotifDirectory(production));

            //preview output folder
            if (production.IsPreview == false)
            {
                //hash output folder
                directoryPaths.Add(ProductionPathHelper.GetLocalProductionHashDirectory(production));

                //production preview directory
                directoryPaths.Add(ProductionPathHelper.GetLocalProductionPreviewDirectory(production));
            }
            else
            {
                //product preview directory
                directoryPaths.Add(ProductionPathHelper.GetLocalProductPreviewProductionDirectory(production));
            }

            //folders for each clip
            foreach (Job job in production.JobList)
            {
                //main clip folder (e.g. "render_temp\productions\virtualcampaign\12345\54321")
                directoryPaths.Add(JobPathHelper.GetLocalJobDirectory(job));
                directoryPaths.Add(JobPathHelper.GetLocalJobRenderOutputDirectory(job));

                if (job.IsZip)
                {
                    //subfolder for each zip production
                    directoryPaths.Add(JobPathHelper.GetLocalJobRenderOutputPathForZip(job));
                }
            }

            //create all folders
            foreach (string directoryPath in directoryPaths)
            {
                success = success && IOHelper.CreateDirectory(directoryPath);
                if (!success)
                {
                    production.ErrorStatus = ProductionErrorStatus.PES_CREATE_DIRECTORIES;
                    return;
                }
            }

            production.Status = ProductionStatus.PS_START_JOBS;
            Work();
        }
        private static void CreateChunklistFile(Job job)
        {
            //get chunk files
            string[] chunkFiles = Directory.GetFiles(JobPathHelper.GetLocalJobDirectory(job), "clip_" + job.Position + "_chunk_*.mp4");
            chunkFiles = chunkFiles.OrderBy(x => x).ToArray();

            //create cliplist file
            string       clipListFilename = JobPathHelper.GetChunkListPath(job);
            StreamWriter writer           = new StreamWriter(clipListFilename, false);

            writer.WriteLine(@"# chunklist");

            foreach (string chunkFile in chunkFiles)
            {
                writer.WriteLine("file '" + chunkFile + "'");
            }
            writer.Close();
        }