ImageGear .NET v25.1 - Updated
RenameFile Method




ImageGear.Twain Assembly > ImageGear.TWAIN Namespace > ImGearTWAIN Class : RenameFile Method
The name of the file/directory to be renamed.
The new name of the file/directory.
This method renames (and optionally moves) a file or directory. Absolute and relative path names are supported.
Syntax
'Declaration
 
Public Sub RenameFile( _
   ByVal oldName As String, _
   ByVal newName As String _
) 
'Usage
 
Dim instance As ImGearTWAIN
Dim oldName As String
Dim newName As String
 
instance.RenameFile(oldName, newName)
public void RenameFile( 
   string oldName,
   string newName
)
public: void RenameFile( 
   string* oldName,
   string* newName
) 
public:
void RenameFile( 
   String^ oldName,
   String^ newName
) 

Parameters

oldName
The name of the file/directory to be renamed.
newName
The new name of the file/directory.
Remarks
A file may not be overwritten with this command. If an Application wishes to do this, it must first delete the unwanted file, then issue the rename command. Filenames in the root directory cannot be moved or renamed.

Use OpenSource to select the desired Data Source, prior to calling this method.

See Also

Reference

ImGearTWAIN Class
ImGearTWAIN Members