delete file 命令示例

在以下示例中, customer.dbf 的结构和所有 country 字段为 usa 的记录都复制在名为backup 的表中。然后将 backup 中的数据复制到一个temp文本文件中,打开此文件并在其关闭时将其删除。

close databases
open database (home(2) + 'data\testdata')
use customer  && opens customer table
copy structure to backup
use backup
append from customer for country = 'usa'
copy to temp type delimited
wait window 'press esc to close and erase temp.txt' nowait
modify file temp.txt noedit
delete file temp.txt
? iif(file('temp.txt'),'file not deleted','file deleted')
use
delete file backup.dbf