Scripting - TechRepublic
General discussion
December 6, 2004 at 11:30 AM
umarazina

Scripting

by umarazina . Updated 21 years, 7 months ago

Hello,

I am new at this (scripting) thing.

Here is a task I am trying to accomplish;
I need to find out all the network shares in every users logins that they map to via this lscritp.bat and also find all the printers they are attaching to.

There is around 1800 folders that are user ids and there is a sub folder in these that is named lcsript.bat for user logins. Below is a copy of the contents in that batch file. These folders are called by another batch file in NETLOGON on Domain Controller.

rem @net use /delete
rem @net use lpt1: \\pmi-nts-file01\[share_name]

@net use g: /delete
@net use g: \\pmi-nts-file01\sosales-common

@net use f: /delete
@net use f: \\sfo-nts-apps02\uar293

@net use m: /delete
@net use m: \\sfo-nts-apps02\bis

@net use r: /delete
@net use r: \\sfo-nts-file02\ddpc-gis

Each one of these 1800 folders is different because it?s associated with user id but in this folders there is a sub folder that is called lscript.bat.

Hey here is what I want to do.

Create a script to look for all network shares in all of these 1800 folders put the output to a text file or Excel sheet.

Also create another script that would look for ?net use lpt1? for all printers.

If someone get me started I hope to search and do more on my own.

Thanks in advance.

This discussion is locked

All Comments