AMRenameFile Example

 

Option Explicit

Sub Main

Dim intReturn As Integer

 

Dim varOldName As Variant

Dim varNewName As Variant

 

 varOldName = "C:\*.txt"

 varNewName = "C:\*.bak"

 

 intReturn = Action2.AMRenameFile (varOldName, varNewName)

 

 If intReturn = 0 Then

  MsgBox "Failure"

  MsgBox( Action2.GetLastError )

 ElseIf intReturn = 1 Then

  MsgBox "Success"

 End If

 

End Sub