OnItemRename
           
|
  Description:
|
|
|
|
Fired after a ListItem is renamed and before the file will be renamed.
|
|
|
|
|
|
|
|
|
|
|
         
|
    Syntax:
|
|
|
|
|
Sub FileViewer1.OnItemRename(ByVal Item As _JRFileListItem, ByVal newname As String, ByVal Cancel As Boolean)
|
|
|
|
|
|
 
|
  Return Values:
|
|
|
|
|
a object with up to 17 informations about the renamed file
|
|
|
newname
|
can be used to change or test the new name, before the file will be renamed.
|
|
|
Cancel
|
set to true to stop the file renaming.
|
|
           
|
  Example:
|
|
|
   
Private Sub filev1_OnItemRename(ByVal item As JRFileListItem, NewName As String, Cancel As Boolean) Label3(5).Caption = item.FileName 'is there no Name for Renamed item then get a name If NewName = "" Then   If item.ListItemTyp = Drive Then     NewName = InputBox("Enter The New Name For " & item.path & ":",           "Rename DRIVE", item.path)   Else     NewName = InputBox("Enter The New Name For " & item.FileName &         ":", "Rename File", item.FileName)   End If End If End Sub
 
|
|
|