[Log In ] [New Posts] []
Go Back   GotApex? Forums Forums > General Topics > Software, OS, and the Internet
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
Old 03-06-2002, 03:30 PM   #1
OC
the admiral formerly known as overclocked
 
OC's Avatar
 
Join Date: Aug 2000
Location: Outside the mainstream
Posts: 5,922
Command line stuff (batch files)

You gotta love batch files. I had to delete a bunch (BUNCH) of TMP files that were interfering with users logging onto W2kP boxes. (see Q271518 in the M$ kb if you want the full explanation.) I had to do this on about 50 different computers. Thank goodness for batch files and the C$ admin share. Here's what I did:

net use q: \\computer1\c$
q:
attrib -r -a -s -h ntuser.pol.tm* /s
del ntuser.pol.tm* /s
d:
net use q: /d
echo net send (myusername) Deleting ntuser.pol.tm* on computer1 completed

net use q: \\computer2\c$
q:
attrib -r -a -s -h ntuser.pol.tm* /s
del ntuser.pol.tm* /s
d:
net use q: /d
echo net send (myusername) Deleting ntuser.pol.tm* on computer2 completed

etc....

The attrib /s switch searches through all subfolders, as does del /s. Once I worked out the details, I simply duplicated the procedure for all boxes on the network and split it into 5 different batch files, mapping drives to L M N O AND Q.

I rock. Hey, you take victories where you can, right?

-OC
__________________
But what is adulthood except a delayed end-run around our parents' better judgment?
-- Peter Egan

*cough*
OC is offline   Reply With Quote
Old 03-06-2002, 03:46 PM   #2
Markel
Chief of Naval Operations
 
Markel's Avatar
 
Join Date: Feb 2001
Posts: 11,733
Doesn't it just thrill you that Mr. Bill thinks we don't have any need for the command prompt?
__________________
stay low... keep moving...
Markel is offline   Reply With Quote
Old 03-07-2002, 05:49 AM   #3
Jeffbx
Fleet Admiral
 
Jeffbx's Avatar
 
Join Date: Mar 2000
Location: Michigan
Posts: 9,390
Send a message via MSN to Jeffbx
I don't know what it is about .bat files that makes me happy. I love them...
Jeffbx is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 09:42 AM.