I created the files cdx with account administrator , It Is the last One account on my PCOtto wrote:Who created the cdx files. Which user account.
erase files - Resolved!!
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: erase files
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
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
Re: erase files
LOCAL xPath := "C:\PDF\"
* --- Elimina File che Iniziano con CLI_...PDF
AEVAL(DIRECTORY(xPath + "CLI_*.PDF"),{|aFile|FERASE(xPath + aFile[F_NAME])} )
nel tuo comando :
cFILE := ALLTRIM( aDIR[1] )
fai un display della variabile cFILE se comprende il path completo + \ , es. c:\mydir\temp2.cdx o vedi solo temp2.cdx
* --- Elimina File che Iniziano con CLI_...PDF
AEVAL(DIRECTORY(xPath + "CLI_*.PDF"),{|aFile|FERASE(xPath + aFile[F_NAME])} )
nel tuo comando :
cFILE := ALLTRIM( aDIR[1] )
fai un display della variabile cFILE se comprende il path completo + \ , es. c:\mydir\temp2.cdx o vedi solo temp2.cdx
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: erase files
Ho messo un trace msginfo(ferror,cfile)
Tutti e due i messaggi viene visualizzato l'errore 5 , il primo mi dà "." e il secondo ".." è sta cosa che non ho capito.
Tutti e due i messaggi viene visualizzato l'errore 5 , il primo mi dà "." e il secondo ".." è sta cosa che non ho capito.
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
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
Re: erase files
Insert a msginfo() before you delete the files and check with "Resource Monitor" the "Assoiated Handles" of your file.
Open the Start menu, type "Resource Monitor" and press Enter.
Switch to the "CPU" tab.
Expand the "Associated Handles" section in the lower panel.
In the search field of the "Associated Handles" section, enter the name of the file you want to check. If the file is being used, it will appear in the list along with the process using it.
Open the Start menu, type "Resource Monitor" and press Enter.
Switch to the "CPU" tab.
Expand the "Associated Handles" section in the lower panel.
In the search field of the "Associated Handles" section, enter the name of the file you want to check. If the file is being used, it will appear in the list along with the process using it.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Re: erase files
la sintassi :
aDir := DIRECTORY(cDir+ "*.*", "D" )
include nell'array anche i "." e ".."
aDIR[1,1] = "."
aDIR[2,1] = ".."
se usi :
aDir := DIRECTORY(cDir+ "*.*" ) , non verranno inglobati "." e ".."
se usi il parametro "D" allora devi controllare il contenuto dell'array
IF cFile <> "." .OR. cFile <> ".."
IF FErase(cDir+cFile ) != 0
? FERROR()
ENDIF
ENDIF
consiglio 1 : senza parametro "D"
consiglio 2 : metti il path -> cDir + cFile
aDir := DIRECTORY(cDir+ "*.*", "D" )
include nell'array anche i "." e ".."
aDIR[1,1] = "."
aDIR[2,1] = ".."
se usi :
aDir := DIRECTORY(cDir+ "*.*" ) , non verranno inglobati "." e ".."
se usi il parametro "D" allora devi controllare il contenuto dell'array
IF cFile <> "." .OR. cFile <> ".."
IF FErase(cDir+cFile ) != 0
? FERROR()
ENDIF
ENDIF
consiglio 1 : senza parametro "D"
consiglio 2 : metti il path -> cDir + cFile
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: erase files
ecco dov'era l'errore il parametro D
static Function Cancella_Archivi(cDir)
local adir := DIRECTORY(cDir+ "*.*" )
local i,cFile
FOR i = 1 to LEN( aDir )
cFILE := ALLTRIM( aDIR[1] )
IF FErase(cDir+cFile ) != 0
Msginfo( FERROR() ,cfile)
endif
NEXT
return nil
static Function Cancella_Archivi(cDir)
local adir := DIRECTORY(cDir+ "*.*" )
local i,cFile
FOR i = 1 to LEN( aDir )
cFILE := ALLTRIM( aDIR[1] )
IF FErase(cDir+cFile ) != 0
Msginfo( FERROR() ,cfile)
endif
NEXT
return nil
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
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