Reputation: 919
I'm making a VB application and I want to copy a file called "L3nEncrypt.jar" which is in resources of the application to the temp folder.
Right now I have this:
My.Computer.FileSystem.SpecialDirectories.Temp
which returns the temp folder.
Upvotes: 3
Views: 4211
Reputation: 919
I found the solution
Imports System.IO
File.WriteAllBytes(My.Computer.FileSystem.SpecialDirectories.Temp & "/L3nEncrypt.jar", My.Resources.L3nEncrypt)
Upvotes: 2
Reputation: 1944
Use System.IO.File.Copy(SourceFileName,DestinationFileName)
The parameters are full file names of type string
. Make sure that you're running the application with admin privileges so that the copying can be successful.
Upvotes: -1