An unhandled exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll : Access to the path … is denied

前端 未结 2 1506
时光取名叫无心
时光取名叫无心 2021-01-17 14:19

I am trying to write a file to a directory that exists and is created by me in G:\\\\ i.e. not a system directory or in root drive like this

<
2条回答
  •  感情败类
    2021-01-17 15:07

    This usually means that either there is a folder named "G:\Song", so you can't replace a directory with a file, or that your windows user account doesn't have permission to write to that drive.

    Right-click on the drive and look at security permissions to be sure you have permission. Also, make sure the drive is not readonly, as in the case of a write-protected SD card or flash drive.

提交回复
热议问题