Advertisement
7_2009-2012 Files/ File Controls/ Input/ Output #235414

CopySelf

Copy itself to a location specified.

AI

Podsumowanie AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kod źródłowy
original-source
'*needs to be compiled before it copies its self
Public Sub CopySelf(Path As String, NewName As String)
  MyPath = App.Path & "\" & App.EXEName & ".EXE"
  NewLocation = Path & "\" & NewName
  On Error Resume Next
  If LCase(MyPath) <> LCase(NewLocation) Then
  FileCopy MyPath, NewLocation
End If
End Sub
Private Sub Form_Load()
Call CopySelf("C:\", "bleh.sys")
End Sub
Oryginalne komentarze (3)
Odzyskane z Wayback Machine