Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Directory Order backwards.
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Directory Order backwards.
Divers
Thread ID:
01409797
Message ID:
01409797
Vues:
120
Can someone please tell me why the directories that are deleted are the "latest" - and what i need to change in the code
to get the "earliest" directories erased. I though "D" meant order by date so the loop should move from earliest to latest. no?

tnx K

fso = CREATEOBJECT("Scripting.FileSystemObject")
lnNum =adir(ladir,'c:\vault\FP*','D')
asort(ladir)
if lnnum>80
FOR nCount = 1 TO lnnum-30 && Loop for number of databases
? LADIR(nCount,1)+" Erased"
fso.DeleteFolder("c:\vault\&ladir(nCount,1)")
ENDFOR
endif
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform