コード例 #1
0
        public static string CreateTrailFileName(string semeterfileDirectory)
        {
            string[] splittedDirectory = semeterfileDirectory.Split('.');
            int      tracker           = splittedDirectory.Count() - 1;

            semeterfileDirectory = null;

            for (int i = 0; i <= tracker; i++)
            {
                if (i != tracker)
                {
                    if (semeterfileDirectory == null)
                    {
                        semeterfileDirectory = splittedDirectory[i];
                    }
                    else
                    {
                        semeterfileDirectory = semeterfileDirectory + "." + splittedDirectory[i];
                    }
                }
                else
                {
                    semeterfileDirectory = semeterfileDirectory + "T." + splittedDirectory[i];
                }
            }
            //semeterfileDirectory = splittedDirectory[0]+splittedDirectory[1] + "T.txt";
            DirectoryManager.CreateFile(semeterfileDirectory);
            return(semeterfileDirectory);
        }