RE: Copy file & Move to directory [HELP] 10-15-2016, 04:37 PM
#6
I'm sorry, the code needed some tweaking.
I tested above code and it worked. I included the msgbox to see where it's copied from and where it's copied too. You can remove it though, just to show you where the files land.
Code:
'Declare the 2 variables
Dim AppData As String = GetFolderPath(SpecialFolder.ApplicationData)
Dim FilePath As String = My.Application.Info.DirectoryPath & "\ApplicationName.exe"
AppData = AppData & "\Fevino\"
'## Copy contents
If File.Exists(FilePath) = True Then
File.Copy(FilePath, AppData & "\application_name.exe")
Else
MessageBox.Show("File does not exist.")
End If
'## Show result
Process.Start(AppData)
MsgBox("File has been copied to: " & AppData & " from " & FilePath)I tested above code and it worked. I included the msgbox to see where it's copied from and where it's copied too. You can remove it though, just to show you where the files land.
~~ Might be back? ~~














![[+]](https://sinister.li/images/modern/collapse_collapsed.png)