Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Batch file suggestions?
Message
 
 
À
25/05/2006 15:33:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Divers
Thread ID:
01125021
Message ID:
01125095
Vues:
24
Al,

pseudocode
dir lpt$vpn.* /oe /b >delfilelist.bat
some old dos command that will delete the last line of the file
another old command that would preface each line with erase
delfilelist.bat
You might also be able to set up a disk management policy on that folder to delete files older than a week.

>I have a client with a W2K Server. They have the Trend Micro OfficeScan product installed on its system (C:) drive. This product downloads large (~17MB/day) virus definition files to a specific folder on C:.
>
>Trouble is, they don't have a lot of free space on C:, so within a couple of months their C: drive fills and their server crashes. It would be nice if Trend would clean up old definition files itself but it doesn't seem to do so.
>
>My first thought was to create a batch file that deletes all of the definition files and schedule it to run periodically. The only trouble is that for the virus definition update process to work properly, the *last* definition file must be present e.g.
>
>LPT$VPN.456
>LPT$VPN.457
>LPT$VPN.458
>...
>LPT$VPN.473
>LPT$VPN.474
>LPT$VPN.475  <-- Latest one, this file must not be deleted
>
>It's simple to make a batch file that deletes *all* of the update files, but much more challenging to write one that deletes all of them except for the very last one.
>
>I'd prefer to do this in a batch file if possible, rather than in Fox.
>
>Anyone have any ideas?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform