OK, this mess will not co-operate at all, just to add to the detail- I managed to get my media out of the onedrive folder, what is left in there now is a file called .iTunes Preferences.plist, this and everything I try to add to iTunes gets stuck in this folder as well.
In the folder where I want everything to be (D:\music) there is all the existing media, also a sub-folder called iTunes which has the current library, every time I open this folder iTunes autostarts so it is the current library. ITunes still insists on adding all new media to the onedrive folder. I have copied the library files to D:\iTunes, gone into edit-preferences-advanced and reset the path from D:\onedrive\Music to D:\iTunes Media. Clicked OK and told it to move and rename files when it asked.
I then asked it to consolidate the files, nothing appeared in the iTunes Media folder, when I stopped it and checked in the edit preferences-advanced menu it had changed the Media folder location back to the D:\onedrive\Music folder again. I have tried the shift+click option and told it to use the correct library on D drive, it insists on using the onedrive folder no matter what I do. I do not want to create a new library and have all 23000 songs listed as unplayed but cannot get it to stop using the onedrive location.