I have a text file that contains settings, such as the output file location. Then I call the file in my program...

File.AppendAllText(@PIoutput, "5," + time.Year + "," + time.DayOfYear + "," + time.ToString("HHmm").TrimStar('0') + "," + time.Second);

When the program runs, I get the error "Illegal characters in path."