Search code examples
c#fileinfo

C# File Disappeared after FileInfo.MoveTo with Local Path (Windows)


I Ran FileInfo.MoveTo("filename.txt") with just a name instead of passing a full path and the file just disappeared. I believe in linux this would make it go to the root directory "/", but on Windows I'm not sure if there is a such thing as a root directory beyond just C: Is there any way to locate my lost file?


Solution

  • It should be in project folder. Usually files without specefying path are saved there. (in folder with .exe file)