delete a file

delete a file

Postby Silvio.Falconi » Thu Oct 31, 2024 1: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: delete a file

Postby MarcoBoschi » Thu Oct 31, 2024 2:00 pm

Silvio,
what return code do you have?
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: delete a file

Postby Rick Lipkin » Thu Oct 31, 2024 2: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: delete a file

Postby nageswaragunupudi » Thu Oct 31, 2024 2:41 pm

Code: Select all  Expand view
if FErase( cFile ) != 0
? FError()
endif
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: delete a file

Postby Silvio.Falconi » Thu Oct 31, 2024 4:03 pm

nageswaragunupudi wrote:
Code: Select all  Expand view
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: delete a file

Postby Otto » Thu Oct 31, 2024 4:11 pm

Silvio, DOS Error 32 is"Sharing violation".
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: delete a file

Postby Silvio.Falconi » Thu Oct 31, 2024 5: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests