Using Directory.Move to rename a folder is leaving the old folder behind

So i have a folder I’m trying to rename (I read i should use Directory.move to do this).

“ExampleA”

I use Directory.Move(“ExampleA”,“New Folder”) - Im simplifying this for explanation.

Where “New Folder” is what “ExampleA” Should be renamed to, this works, it moves the directory and it’s contents but it’s also leaving the “ExampleA” folder still there, and when i try and delete it it says It Doesn’t exist.

Full Code here

Directory.Move(Application.dataPath + "/Photos/" + GameObject.Find("Camera").GetComponent<CameraController>().cardNames[assignmentButton], Application.dataPath + "/Photos/" + renameInput.text);

I’m using

    #if UNITY_EDITOR
    UnityEditor.AssetDatabase.Refresh();
    #endif

to refresh things in the UI but that has no effect.

It Doesn’t appear to happen in a built unity project, it works compeltely as intended. My guess is that theres an issue with File.Delete working in the unity directory or that my unity directory is currently in a Github folder which may limit my use of deleting files.
So because of this ill class this as answered.