private void CopyAllFiles()

in DiagManager/DiagClasses/PackageMgr.cs [379:429]


        private void CopyAllFiles()
        {
            string FinalOutputFolder = m_userchoice[Res.OutputFolder];
            

            ConfigFileMgrEx configMgr = new ConfigFileMgrEx(m_userchoice);

            //clear tempDirectory
            Globals.DeleteDir(m_tempDirectory);

            MakeLogmanConfigFile();
            MakeManualBatchFiles();

            //generate XEvent script file
            StreamWriter srXEventFile = File.CreateText(m_tempDirectory + @"\pssdiag_xevent.sql");
            srXEventFile.Write(m_userchoice.XEventCategoryList.GetCheckedDiagItemList().GetSQLScript());
            srXEventFile.Flush();
            srXEventFile.Close();

            //pssdiag.xml
            configMgr.SaveConfig(m_tempDirectory + @"\pssdiag.xml");


            // copy custom diagnostics

            List<DiagCategory> selectedcustomDiagList = m_userchoice.CustomDiagCategoryList.GetCheckedCategoryList();


            foreach (DiagCategory cat in selectedcustomDiagList)
            {
                string src = Globals.ExePath + @"\CustomDiagnostics\" + cat.Name;
                Globals.CopyDir(src, m_tempDirectory);

                Globals.CopyDir(src + @"\" + m_userchoice[Res.Platform], m_tempDirectory);

            }


            //Copy Pristine
            Globals.CopyDir(Globals.ExePath + @"\Pristine", m_tempDirectory);
            Globals.CopyDir(Globals.ExePath + @"\Pristine\" + m_userchoice[Res.Platform], m_tempDirectory);
            Globals.CopyDir(Globals.ExePath + @"\Pristine\" + m_userchoice[Res.Version] + @"\"+ m_userchoice[Res.Platform], m_tempDirectory);
            string customdiagxml = m_tempDirectory + @"\CustomDiag.XML";

            //these are copied over from custom diag folder. we don't need it
            if (File.Exists(customdiagxml))
            {
                File.Delete(customdiagxml);
            }

        }