Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Directory Order backwards.
Message
 
 
To
02/07/2009 14:14:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01409797
Message ID:
01409826
Views:
46
>thanks Boris - i am using VFP9 like you.
>
>if i understand 'help' correctly
>
>asort(ladir,3) would sort on date of directory - from the evidence i see displayed running this program,
>the order looks correct now. Is this logical way to proceed?
>
>k
>
>fso = CREATEOBJECT("Scripting.FileSystemObject")
>lnNum =adir(ladir,'c:\\vault\FP*','D')
>asort(ladir,3)
>FOR nCount = 1 TO lnnum - 0 && Loop for number of databases
> ? LADIR(nCount,1)+" Erased"
> *fso.DeleteFolder("c:\vaniermu\vault\&ladir(nCount,1)")
>ENDFOR

Yes, just don't use macro substitution here - it's not needed.
FOR nCount = 1 TO lnnum - 0  && Loop for number of databases
>  		? LADIR(nCount,1)+" Erased"
              * you can also remove directory using RD (("c:\vaniermu\vault\" + ladir(nCount,1))

>		*fso.DeleteFolder("c:\vaniermu\vault\" + ladir(nCount,1))
>ENDFOR
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform