Automatically delete all autorun.inf files with any attributes from any directory on all drives:
@ECHO off
FOR %%c in (Z,Y,X,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C) do (
IF exist %%c: (
del /f /s /a /q %%c:autorun.inf
)
)
The second line checks whether drive %%c exists. My question is: can DOS recognize that (Z,Y,X,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C) represent drive letters?
A newbie's confusion
@ECHO off
FOR %%c in (Z,Y,X,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C) do (
IF exist %%c: (
del /f /s /a /q %%c:autorun.inf
)
)
The second line checks whether drive %%c exists. My question is: can DOS recognize that (Z,Y,X,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C) represent drive letters?
A newbie's confusion

