Advertisement
2_2002-2004 Files/ File Controls/ Input/ Output #114472

CopySelf

Copy itself to a location specified.

AI

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.

소스 코드
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
원본 댓글 (3)
Wayback Machine에서 복구됨