ImageGear for C and C++ on Windows v20.3 - Updated
IG_TWAIN_file_rename
API Reference Guide > TWAIN Component API Reference > TWAIN Component Functions Reference > Device File System Functions > IG_TWAIN_file_rename

This function renames (and optionally moves) a file or directory.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_TWAIN_file_rename(
        LPCSTR lpszOldName,
        LPCSTR lpszNewName
);

Arguments:

Name Type Description
lpszOldName LPCSTR The name of the file/directory to be renamed.
lpszNewName LPCSTR The new name of the file/directory.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

Absolute and relative path names are supported. 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 IG_TWAIN_source_open() to select the desired Data Source.

Is this page helpful?
Yes No
Thanks for your feedback.