Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Batch file suggestions?
Message
From
25/05/2006 16:15:20
 
 
To
25/05/2006 15:33:44
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01125021
Message ID:
01125044
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform