Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Erase fpx files
Message
From
29/10/2014 00:24:04
 
 
To
28/10/2014 20:16:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01610054
Message ID:
01610064
Views:
22
that went a lot smoother- many thanks Tore.
k

>I wrote the code without actually testing it, and forgot that the laDir array is a multi column array. Try this
>Erase ListOfFailedFiles.txt
>lnFiles = adir(laDir,'*.fxp')
>for lnX = 1 to lnFiles
>   Try
>      Erase (laDir(lnX,1))
>   Catch
>      Strtofile(laDir(lnX,1),'ListOfFailedFiles.txt',1)
>   EndTry
>Endfor
>If adir(laDir,'ListOfFailedFiles.txt')>0
>   modi file ListOfFailedFiles.txt
>Endif
>
>>The count is correct - but the program never actually finishes the full cycle - I placed this before the TR to monitor the processes
>>
>>WAIT WINDOW (laDir(lnX))
>>
>>I found that I was getting 5 different stops on each fxp file - so that if the lnfiles count is multiplied by 5 it makes it through.
>>on each stop the ladir - lnx shows the name, then 4 stops follow which show date, time and 2 other properties I don't recognize. So each erasure actually takes up 5 separate counts. Anyway to fix this?
>>
>>k
>>
>>>I do something like this
>>>
>>>Erase ListOfFailedFiles.txt
>>>lnFiles = adir(laDir,'*.fxp')
>>>for lnX = 1 to lnFiles
>>>   Try
>>>      Erase (laDir(lnX))
>>>   Catch
>>>      Strtofile(laDir(lnX),'ListOfFailedFiles.txt',1)
>>>   EndTry
>>>Endfor
>>>If adir(laDir,'ListOfFailedFiles.txt')>0
>>>   modi file ListOfFailedFiles.txt
>>>Endif
>>>
>>>>I am trying to set up a refresh of new programs by removing all fxp files in my directory.
>>>>Problem is I hit fxp's that are open or in memory.
>>>>
>>>>Erase C:/mydir/*.FXP
>>>>
>>>>I am trying an< if error()=1719 > then diverting to an error handler.
>>>>Any suggestions as to what i should put into the error handler to bypass the open files would be appreciated.
>>>>Or is there an alternate way of doing this outside of manually removing the files
>>>>
>>>>tnx
>>>>k
Previous
Reply
Map
View

Click here to load this message in the networking platform