Thursday, July 8, 2010

Another simple batch file

Here's another simple batch file that uses a for loop.

FOR %%A IN (e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) DO net use %%A: /delete

Copy this code and paste it into notepad and save with the .bat extension.

This code simply deletes mapped drives using any of the above letters.

This isn't practical and I'm sure there are better ways of achieving the results, but in the end, it works.

No comments:

Post a Comment