I cant get this to work:
FileCopy App.Path & "\" & App.EXEName & ".exe", "D:\heyhey.exe"
all i want to do is copy my orgininal exe from its current directory, to another, why does it keep telling me file not found?
Printable View
I cant get this to work:
FileCopy App.Path & "\" & App.EXEName & ".exe", "D:\heyhey.exe"
all i want to do is copy my orgininal exe from its current directory, to another, why does it keep telling me file not found?
That code works fine for me. If your file is located in C:\, it will not work, it will show up: C:\\Project1.exe"
Here is how to change that:
Your problem may also be that the EXE is not created. Did you Make EXE File... first before running the project?Code:Destination = "D:\heyhey.exe"
Source = App.Path & "\" & App.EXEName & ".exe"
If InStr(x, "\\") Then
Source = App.Path & "\" & App.EXEName & ".exe"
End If
FileCopy Source, Destination