Importing scripts programmatically

I want to import some C# scripts into my project using an Editor script. How do I do that?

Something like: importScript("/path/to/script.cs", "Assets/Scripts/script.cs"); – how do I code this?

This will do it

using System.IO;
using UnityEditor;

...

static void importScript(string sourcePath, string targetPath)
{
    File.Copy(sourcePath, targetPath);
    AssetDatabase.ImportAsset(targetPath);
}