Versions des environnements
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement