Applies To: |
|
Summary: |
I am calling FileFind() in a loop to get a
number of file and then copy each to another name. Here is the
example from the online help:
This only copies one file then ends. What is happening? |
Solution: |
As soon as you call any of the other File
functions such as FileCopy() or FileDelete(), FileFind() is reset,
so calling FileFind("",0) no longer returns the next file matching
the previous search pattern, then the while loop exits and the
function finishes.
One solution to this problem is to call FileFind() recursively so it finds all files first then copies or deletes them. Here is an example of a Cicode function called MoveFiles(). In this example, files matching *.DBF in the [DATA] directory are renamed to *.BAK eg. MoveFiles("[DATA]:\*.DBF")
CIT has confirmed this to be a problem in Citect for Windows version 5.x. We are researching this problem and will post new information here as it becomes available. |
Keywords: |
Related Links
Attachments