... Cancella_Archivi(cDir) local adir := DIRECTORY(cDir+ "*.*" ) local i,cFile FOR i = 1 to LEN( aDir ) cFILE := ALLTRIM( aDIR[i][1] ) IF FErase(cDir+cFile ) != 0 Msginfo( FERROR() ,cfile) endif NEXT return nil
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[i][1] ) fai un display della variabile cFILE se comprende il path completo + \ ...
The command ERASE <cfile> is preprocessed as FERASE( <cfile> ). This command or function should work (and it works for me) if the file exists and is not in use and can be deleted. If the ERASE command does not really erase an existing ...
Entiendo q quieres borrar el fichero para q no se quede por alli una vez cierres el visor. O creas un hilo q este pendiente o despues de abrir puedes hacer algo como
While fErase(cFile) = -1 Syswait(1) End
No lo he probado. Este paso te congela la aplicacion, claro
sugiero lo que comenta Joao al cerrar o salir de los sistemas aFicheros := directory( ".\tmp\*.*" ) for i := 1 to len(aFicheros) ferase( '.\tmp\'+aFicheros[i][1] ) next
... a "Local Cache" which can made Problem when use "Local" Action this is e.g. with "temporary" Action like INDEX ON or FERASE(localfile) btw. Question : does FiveWin "lock" Index like Xbase++ do :?: read here what is recommend for SMB2 when work with "temporary" ...
... CMS','al cerrar la data del objeto CMS','al crear el Archivo de Salida',; 'en la generación final del archivo CMS' } If File( cPath+'TA.xml') Ferase( cPath+'TA.xml') Ferase( cPath+'TRA.tmp') Ferase( cPath+'TRA.xml') End * Grabo el nuevo numero de ID EscribeIni( 'FactElec','ID', nId ) * Armo ...
... CMS','al cerrar la data del objeto CMS','al crear el Archivo de Salida',; 'en la generación final del archivo CMS' } If File( cPath+'TA.xml') Ferase( cPath+'TA.xml') Ferase( cPath+'TRA.tmp') Ferase( cPath+'TRA.xml') End * Grabo el nuevo numero de ID EscribeIni( 'FactElec','ID', nId ) * Armo ...
... IF NETUSE( xVol+"\DBTMP\"+CustDbf+".DBF", .T.,5) Index on CustName TAG CustName Set Order to Tag CustName ELSE CLOSE DATABASES FERASE( xVol+"\DBTMP\"+CustDbf+".DBF") FERASE( xVol+"\DBTMP\"+CUSTDBF+".CDX") oDlg:END() RETURN(NIL) ENDIF Select ...