delete *.ntx files

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

delete *.ntx files

Post 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
All The Best,
Franco
Canada
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: delete *.ntx files

Post 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
have fun
Jimmy
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: delete *.ntx files

Post by serge_girard »

Franco,

Did you try with FERASE?
FERASE("C:\folder\t*.ntx" )
There's nothing you can do that can't be done...
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: delete *.ntx files

Post 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.
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: delete *.ntx files

Post by franco »

Sorry I am away. Will check when I return.
Thanks all.
All The Best,
Franco
Canada
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: delete *.ntx files

Post 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
All The Best,
Franco
Canada
Post Reply