SilkyFalcon

Generation

generate functionWed, 07 Dec 2022

open every file in a specific folder than open all of them and write "Coded by Inventex" to the first line as a comment

using System.IO; string path = "C:\Users\ierturk\Desktop\test"; string[] files = Directory.GetFiles(path); foreach (string fileName in files) { string content = File.ReadAllText(fileName); File.WriteAllText(fileName, "// Coded by Inventex\r\n" + content); }

Questions about programming?Chat with your personal AI assistant