Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you delete oldest Directories?
Message
 
 
To
12/05/2009 16:36:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01399335
Message ID:
01399500
Views:
56
Karen,

the third column in the array is the date of the file, can you use that to determine your oldest folders?

If not you can use a recursive operation to drilldown into the directories to get the dates on the files in the folder. Check the Wiki article http://fox.wikis.com/wc.dll?Wiki~RecursionInVFP~VFP

>Thnks again Tore. I seem to have the worst luck with your answers. All what you say is golden - it looks like it should work but alas i get nudda
> you suggested:
>lnNumDir=adir(laDir,'c:\temp','D')
>
>Here is the exact codes i am using - together with the results of each search: (there are in fact well over 150 directories)
>
>lnNum =adir(ladir,'c:\Temp\post\vault\','D')
>? lnnum
>FOR nCount = 1 TO lnNum
> ? laDir(nCount,1)
>ENDFOR
>RESULTS OF THE SEARCH:
> 2
>.
>..
>
>lnNum =adir(ladir,'c:\Temp\post\vault','D')
>? lnnum
>FOR nCount = 1 TO lnNum
> ? laDir(nCount,1)
>ENDFOR
>RESULTS OF THE SEARCH:
>
> 1
>VAULT
>
>It doesn't seem to want ot count INSIDE the vault directory.
>
>What am i doing wrong here?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform