Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Batch file suggestions?
Message
De
25/05/2006 16:15:20
 
 
À
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:
01125044
Vues:
21
Have you checked out the HELP on the FOR command? There seems to be some options available (beyond what was available in DOS) that could come in handy.

Maybe something like this (haven't tested this)?

@ECHO OFF
DIR /B /OD LPT$VPN.* > C:\TMP\MYLIST.TXT
SET LastF=
FOR /F %%i IN (C:\TMP\MYLIST.TXT) DO SET LastF=%%i
IF [%LastF%]==[] GOTO Quit
FOR /F %%i IN (C:\TMP\MYLIST.TXT) DO IF NOT [%%i]==[%LastF%] DEL %%i
SET LastF=
:Quit
DEL C:\TMP\MYLIST.TXT
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform