Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete this file
Message
De
12/12/2005 17:06:04
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01077325
Message ID:
01077336
Vues:
27
>>>I have the latest patches loaded ...
>>>
>>>Actual code where file is not being deleted
>>>
>>>      cDestinationHName= cHTML+"\"+ ;
>>>                         ALLTRIM(JUSTSTEM(laFileListWS [ifw,1]))+"\"+ ;
>>>                         ALLTRIM(JUSTSTEM(laFileListWS [ifw,1]))+" "+.ActiveWorkBook.ActiveSheet.Name+".html"
>>>      IF !DIRECTORY(cHTML+"\"+ALLTRIM(JUSTSTEM(laFileListWS [ifw,1])))
>>>         MKDIR cHTML+"\"+ALLTRIM(JUSTSTEM(laFileListWS [ifw,1]))
>>>      ENDIF
>>>SET STEP ON
>>>
>>>      IF FILE(cDestinationHName)
>>>         DELETE FILE &cDestinationHName
>>>      ENDIF
>>>
>>>While in debug - file not found with
>>>
>>>fname="test_12_12_2005_1 total test summary.pdf"
>>>fdir="\\koshfp01\KohlerChart\HTML\"
>>>DELETE FILE fdir+fname
>>>
>>>If you issue FILE(fdir+fname) FILE IS THERE!
>>>
>>>What's Up?
>>
>>FILE() can give misleading results (file is in path, in .EXE, etc.). What does ADIR() show for that file?
>It is seen as file number 49

Your delete FILE statement is incorrect. You need to do:
DELETE FILE (fdir+fname)
You were trying to delete a file named fdir+fname, not the contents of those variables.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform