can someone help me script something...
I hope this isn't to imposing on someone with the right skill set...but I need some help. I could probably spend a week or two teaching myself how to do this, but my time horizon is much more pressing.
Here's my deal: I have 10000 plus directories, within each are a few files that are essentially a hosts files from a windows workstation. This is all sloppily pulled by SMS, and extracted from a SQL DB I think. The SMS folks and the SQL DBs are no longer in the picture. My directory and file names are codes that apparently relate back to data in the DB.
I need to find the files within each directory that match the default hosts file (usually located here: C:\WINDOWS\system32\drivers\etc) on a windows workstation and delete them. Then I need to delete empty directories.
This should leave me only with directories which contain hosts files that DO NOT match the default hosts file from a windows workstation.
I'm told this should be relatively easy with a batch file doing some FOR and FC commands, directory "looping," and error level output reading?
I'm happy to give more background if needed.
I'm a little over my head (in that I'm not a scriptor or programmer), new to this environment, and kind of being tested. I'd really like to pass this "TEST"
Any help would be greatly appreciated.
-bear
__________________
It's alot easier to ask for forgiveness then it is to ask for permission.
|