General information
Category:
Coding, syntax & commands
Title:
Directory Order backwards.
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only