cant write file to hard disk in vb.net

后端 未结 2 877
忘掉有多难
忘掉有多难 2021-01-17 06:52

Hi I checked All Questions Present here did not helped me so I asked

Ok here we go

I try to copy file from \"Resources\" to \"C:\\Test\" Folder does not work

相关标签:
2条回答
  • 2021-01-17 07:27

    Your Problem Was That You Where Writing To A Null Path Like This "C:\test" , Instead You Have To Include The Extension Of The File You Want To Write

    Example If You Have A test.txt File In Your Resources Then You Use It like This

    IO.File.WriteAllText("C:\Test.txt", My.Resources.test)
    
    0 讨论(0)
  • 2021-01-17 07:33

    You need to specify the filename in the path. And also, you need to convert the file from resource to Bytes array. Because that's what the WriteAllBytes() function would be expecting

    Do a search in Google.

    0 讨论(0)
提交回复
热议问题