[windows2000] Re: Removing contents of a directory

  • From: Chris Berry <chris_berry-list-windows2000@xxxxxxxxxxxxxxxxx>
  • To: windows2000@xxxxxxxxxxxxx
  • Date: Mon, 29 Mar 2004 21:16:50 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Drew S wrote:

|>No offense but if you're using a Novell server don't you think it would
|>make sense to ask a Novell list?
|
| If I believed that this was a server-side solution, yes. However... I was
| thinking there was likely a way to take care of this from the client
side -
| where the users and admins sit: windows 2000.
|
| It's not exactly the first time this list has had an off-topic post
anyway.

Hehe, true, and no problem, I just went back and reread your post, looks
like I misinterpreted what you were asking anyways.  I thought you were
trying to figure out how to configure the server to prevent people from
deleting certain things on Novell, but it looks like you just wanted
some scripting help which is reasonably on topic.

#!Perl
use strict;

open INPUT_FILE, "<input_file_name";
while (<INPUT_FILE>) {
        my $username=$_;
        `del \\\\server0\\data\\users\\department\\$username\\*.*`;
}
close INPUT_FILE;

Then just populate the input file with usernames one per line.

- --
Chris Berry
chris_berry@xxxxxxxxxxxxxxxxx
Systems Administrator
JM Associates & Coast Business Service

"He who laughs last probably made a back-up." --Murphy's Seventh law of
computing
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAaQLCkAS13ByzgbsRAqxoAJ9DIjm2cX+/0RjU9N7g+rJ+7JApfACghliI
TVgSFeUXajAqeYhmOv0IeIg=
=81w4
-----END PGP SIGNATURE-----
********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: