File.Move won't work : IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path:
Hi ! So here is the thing, I writing a code to move files from a folder A to a folder B... pretty straight forward ! I'm using File.move to do so but it keeps telling me that the files I want to move from folder A already exists in the folder B... Which is weird as I just created this folder B and it's completely empty ! I've tried with different files, different folders/directory, tried to quit and re lunch Unity... I don't understand why it does that ... :(
So if you know what's going on, or if you have a way to fix it please share ! :D Or even if you know an other way to do the same thing File.move does !
Here is the full error:
IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path: System.IO.File.Move (System.String sourceFileName, System.String destFileName) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:337) MainScript.sortFiles () (at Assets/MainScript.cs:49) UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEvent.Invoke () UnityEngine.UI.Button.Press () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:35) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:44) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:52) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:269) UnityEngine.EventSystems.EventSystem:Update()
Also I know there is already a post about it:
( http://answers.unity3d.com/questions/593176/filemove-wont-work-error-ioexception-win32-io-retu.html ) but no real help there and no answer to the question...
Anyway thanks for your help and time ! :)
Your answer
Follow this Question
Related Questions
Unhandled Exception: System.StackOverflowException when using Switch Statement? 1 Answer
error CS0201 1 Answer
Nav Mesh Problem with SetDestination 1 Answer
Advertising 0 Answers