Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan no running
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01418319
Message ID:
01418338
Vues:
45
I managed to replace all SPAM with .T. acording to condtion

Now I want to delete all attached spam files

I am using: DELETE FILE (ALLTRIM(email_anexo.ANEXO) )

But I get "invalid path" message when field content is something like: C:\GERA2\emails\anexos\34468_0::: :::ATT00000

How can I skip such records, to prevent scan to stop ?


************************************************************************************

SELECT email_anexo
scan for EMAIL_ANEXO.SPAM = .T.

MSG = SYS(5)+ CURDIR()+ emails.msg_path
MSGTX = SYS(5)+ CURDIR()+ emails.msgtx_path

DELETE FILE (MSG)
DELETE FILE (MSGTX)

IF NOT FILE (anexosPath + ALLTRIM(email_anexo.ANEXO))
THISFORM.TEXT3.Value = THISFORM.TEXT3.Value + 1
ENDIF
THISFORM.REFRESH


DELETE FILE (ALLTRIM(email_anexo.ANEXO) )

ENDSCAN
****************************************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform