Page 1 of 1
delete *.ntx files
Posted: Fri Aug 30, 2024 4:09 pm
by franco
I create a lot of temporary index`s in c:\mybrw folder. some do not get deleted.
When exiting program I would like to delete the undeleted temporary index`s. They all start with t and are .ntx files
delete 'c:\mybrw\t*.ntx'.
is there a way to delete *.ntx
Thanks in advance Franco
Re: delete *.ntx files
Posted: Fri Aug 30, 2024 4:44 pm
by AUGE_OHR
hi,
when use a FILE it take some Time before it "free" it.
when it happens in Network it is a SMB2 Problem of "FileInfoCacheLifetime"
https://learn.microsoft.com/en-us/previ ... dfrom=MSDN
Re: delete *.ntx files
Posted: Sat Aug 31, 2024 6:51 am
by serge_girard
Franco,
Did you try with FERASE?
FERASE("C:\folder\t*.ntx" )
Re: delete *.ntx files
Posted: Sat Aug 31, 2024 8:30 am
by edk
hb_FileDelete(<cFileMask> [,<cAttr>]) ➜ lResult
removes files which match given <cFileMask> (it may contain path) and returns .T. if at least one file was deleted. Optional <cAttr> parameter can be used to include system "S" and hidden "H" files. If <cAttr> contains "R" letter then before deleting READONLY attribute is removed.
Re: delete *.ntx files
Posted: Wed Sep 04, 2024 3:09 pm
by franco
Sorry I am away. Will check when I return.
Thanks all.
Re: delete *.ntx files
Posted: Sat Sep 14, 2024 5:05 pm
by franco
Thanks guys,
Serge, It would not work for me.
Edward, Yours worked perfect .
I create a folder in the c drive of every computer on the network. This is where I send temporary indexes witch all start with tf****.ntx
hb_FileDelete("c:\dir\tf*.ntx")
Franco