Microsoft KB Archive/82005

= Microsoft Knowledge Base =

Rebuild FILELIST if You Create or Delete Files in SETFILE List
Last reviewed: October 19, 1994

Article ID: Q82005

The information in this article applies to:

- Microsoft Test for Windows, versions 1.0 and 2.0

SUMMARY
If you delete files that are in a currently active file list (created with the SETFILE statement), you will not be able to remove the files from the list using SETFILE, OFF. Because SETFILE searches the current directory for the file(s) matching the current filespec each time it needs to operate on the current file list, it will no longer be able to find or operate on files that have been deleted.

If you delete or change files from under a file list, you should rebuild the list (using CLEARLIST and SETFILE in version 1.0, or FILELIST REFRESH in version 2.0).

MORE INFORMATION
When you set up a file list using the SETFILE statement, you can use wildcard characters to refer to a number of related files. The file list is not automatically updated if you create a new file that matches the file list specification, or if you delete an existing file that was added based on the original file specification.

If you delete a file that is in the list, you will not be able to remove it from the list using the SETFILE command as you might expect. In order to delete a specific file from the file list, Test must first be able to find the file on the system. If you do delete a file such that this condition occurs, you must clear the file list using CLEARLIST and re-create it using SETFILE.