Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete Files older than a certain Filename?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01444235
Message ID:
01444238
Vues:
53
Hi Nick,
LOCAL lcPath,lcFile
LOCAL ARRAY laFile(1)
lcPath="e:\xx\"

lcFile=SYS(2000,lcPath+"*.*") && get first file
DO WHILE !EMPTY(lcFile)
   =ADIR(laFile,lcPath+lcFile) && Get file informations
   ?laFile(1,1),laFile(1,2),laFile(1,3),laFile(1,4)
   * Your test

   lcFile=SYS(2000,lcPath+"*.*",1) && get next file
ENDDO   
>I have a direcectory of tables, one for each month (yyyymm.dbf), which I need to cycle through and delete all those older than 30 days.
>
>SYS(2000) would let me cycle through all files in the directory and check if each one is older than the 30 days but this seems a very
inelegant way of solving this.
>
>Can anyone think of a cleaner way of achieving this?
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform