EZTwainX File Methods

These are the methods offered by the File child object of the EZTwainX control. In most languages if the EZTwainX control is called eztwain, you call these methods by writing something like this:

    eztwain.File.Rename("temp.tif", "document.tif")

See also: File Properties, Folder Methods

• The file operations only work on files with a recognized image-file extension: BMP, DCX, GIF, JPG, JPEG, MPT, PDF, PNG, TIF, TIFF.

• Any filename which is not fully qualified is interpreted relative to the WorkingDirectory.
For example, if eztwain.File.WorkingDirectory is "c:\TEMP" and you call eztwain.File.Copy("a.tif", "b.tif") this will be interpreted as eztwain.File.Copy("c:\TEMP\a.tif", "c:\TEMP\b.tif")

• In Javascript as in C and C++, remember to double the backslashes: "C:\\foo.pdf" - A single backslash just quotes the following character.

Method  Description Version
Copy(a, b) Make a copy named b of the file named a. 1.59
Delete(x) Delete file x. Fails if deletion fails for any reason. 1.59
Exists(x) Returns True if file x exists, False otherwise. 1.60
List(pattern) Return a list of all image files that match the pattern string.
Example: List("*.*")
1.59
Move(a, b) Move file a to b.
Move("a.jpg", "b.jpg") is basically a rename of a.jpg to b.jpg.
Can move between volumes e.g. Move("scan.pdf", "Z:\fresh")
Throws an error if anything goes wrong.
1.59
Size(x) Returns the size in bytes of file x.
If your languages cares, the result is type double
1.60
DateCreated(x) Returns the creation date & time of file x. The returned value is a Date object. 1.60
DateLastAccessed(x) Returns the DateLastAccessed property of file x. 1.60
DateLastModified(x) Returns the DateLastModified property of file x. 1.60