Computing.Net > Forums > Windows 2000 > Batch File to Delete Profiles

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch File to Delete Profiles

Reply to Message Icon

Name: randar
Date: January 28, 2004 at 11:22:48 Pacific
OS: Win 2000 Pro
CPU/Ram: 686 with 128MB
Comment:

I've got some computers with really small hard drives at work that I am constantly having to clean out. We have roaming profiles on our Novell/Win2K network that are created on the local machine each time a new user logs in. I want to create a batch file that will delete all of the user profiles in C:\Documents and Settings except for the user that is currently logged in. I would think this is a simple thing to create, but I've had no luck. All of the profiles are the format XX555555, that is, two letters followed by six numbers. If anyone has some help to this I would greatly appreciate it (as would my users).



Sponsored Link
Ads by Google

Response Number 1
Name: Analyst
Date: January 28, 2004 at 14:14:08 Pacific
Reply:

There is a command line utility out there called XDelete;
http://weblogs.asp.net/bhouse/articles/27986.aspx
that allows you to delete a folder and all files and subfolders therein, but you'd have to do some tricky stuff to get a script to delete only those profiles not in use.

But is that really fixing the problem? I'll tell you one thing that can be a major problem with profiles getting bloated in size. It's Internet Explorer's default setting to use a huge amount of disk space for Temporary Internet Files. On large hard drives, I've seen it reserve over a gig of space for nothing more than temp Internet files! Then, when you have multiple people logging on, even more disk space gets wasted. So what you may do to try and reduce the profiles size, is check how much disk space is being reserved for Temporary Internet Files, then manually reduce it to a more manageable level, like maybe 5MB or less. Also, tell users not to store stuff on there desktop or in the My Documents folder, but instead on the server in a folder they have access too, such as their home directories.

You can also modify the Default User profile, which the system uses as a template profile for all new users who log in, to change the Temp Int Files setting for any new users who log in.

Last, but not least, take it from someone who has experiance in the industry, roaming profiles are a nice idea on paper, but in practice, they are prone to problems, unreliabe, and generally more trouble than they are worth. Maybe you might want to consider not using them anymore. Even Microsoft admits now on the support site it's probably note a good idea to use them.


0

Response Number 2
Name: randar
Date: January 29, 2004 at 08:42:40 Pacific
Reply:

Thanks for the information. I've looked at XDel, but it doesn't seem to be the type of application that I need. I agree with what you've commented on, and part of my frustration is the total lack of power that I have at my job.

Roaming profile are not my decision, they come from higher up, so getting rid of those is out of the question. Our overall administrators think that roaming profiles are the way to go, so us lowly day-to-day admins have to deal with them.

Modifying the Default User profile may work for a while. The machines do get regularly reimaged, which is unfortunate (since those image come from the powers on high). But, I think of everything suggested, that may be my next step.

The real problem is that these machines have 2GB hard drives. So, each machine has the potential for 16-20 users. Each time a user logs in to the computer, their profile gets created in the increasingly smaller space. When the HDD is full, the default profile loads up, giving them full access (which is undesired).

So, my hope is that there is a way to batch delete all of the user profile directories. Maybe someone will find a way!


0

Response Number 3
Name: iamapassenger
Date: January 31, 2004 at 13:42:32 Pacific
Reply:

Why don't you try to use a database for this,
not the default 'PATH' but MySQL could fetch this without taking the same ammount of disk space as Access or MSSQL (veeery buggy and virii ;-)
..
Since you scope your users as a STRING with a REGEX pattern(^[0-9]*[a-zA-Z]$) you could also use ANY Perl or PHP function to DELETE, set FTP -Quota, HTTP--GET-HEAD-POST-OPTIONS %glob{'SERVER'} = (session_ID, ...)
for each user.
info PERL, MySl and
CPAN tech at trolltech.com / *.org


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: Batch File to Delete Profiles

Batch file to delete the temp files www.computing.net/answers/windows-2000/batch-file-to-delete-the-temp-files/33636.html

Batch file to delete with criteria www.computing.net/answers/windows-2000/batch-file-to-delete-with-criteria/60176.html

batch file to delete www.computing.net/answers/windows-2000/batch-file-to-delete-/20477.html