FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour delete a file
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
delete a file
Posted: Thu Oct 31, 2024 01:10 PM

I t ried with FERASE( cFile ) or DELETEFILE( cFile ) with no success!!!

How I can resolve ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: delete a file
Posted: Thu Oct 31, 2024 02:00 PM

Silvio,

what return code do you have?

Marco Boschi
info@marcoboschi.it
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: delete a file
Posted: Thu Oct 31, 2024 02:25 PM

SIlvo

Are you sure cFile contains the full path of the file you wish to delete ... cfile := "c:\mydata\main.exe" the ferase( cFIle ) should work.

Rick Lipkin

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: delete a file
Posted: Thu Oct 31, 2024 02:41 PM
Code (fw): Select all Collapse
if FErase( cFile ) != 0
? FError()
endif
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: delete a file
Posted: Thu Oct 31, 2024 04:03 PM
nageswaragunupudi wrote:
Code (fw): Select all Collapse
if FErase( cFile ) != 0
? FError()
endif
Give me error 32 and not delete the file

I created the file on root of exe , and i must delete the file because It change each time i make a operation
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: delete a file
Posted: Thu Oct 31, 2024 04:11 PM

Silvio, DOS Error 32 is"Sharing violation".

Best regards,

Otto

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: delete a file
Posted: Thu Oct 31, 2024 05:24 PM

I create the file With Fopen

Then i create adata from this file and close It With fclose

Then i Wish delete It show adata With xbrowse

Witch sharing violation i made ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion