Article # 696, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Using FileCopy() on a GEOS file, DOS file already exists.
If you stick to using the FileCopy() routine, you'll never overwrite an existing DOS file, no matter what the filenames are. There are basically two cases for FileCopy() when used to copy a GEOS file to a directory where a DOS file already exists of the same name: 1. The file copy will succeed and there'll be a file that is uniquely named in the destination directory. It might be the same DOS name it was before or it will be changed to avoid overwriting an existing DOS file. 2. The file names conflict and you'll get a ERROR_FILE_FORMAT_MISMATCH. This implies that the FileCreate() that is called by FileCopy() tried to open an existing file (in your case, the DOS file) and then checked the file format. It wasn't a GEOS file and thus it complains. You could use FileCreateTempFile() to create a uniquely named file. The DOS name of the GEOS file really makes no difference at all. You can change it using DOS commands and it will not affect GEOS.