Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vbscript to find files on local hard disk

Status
Not open for further replies.

sbarwari

MIS
Apr 9, 2012
3
US
Hi guys,

I"m looking for a vbscript that will search for any files with extension "ora" on local hard drives, if found, replace them with a new version of that file from a location on my server?

so it would be find *.ora on c:\ if found then overwrite from \\serever\filename.ora.

I have to run this vbscript from a GPO on all machines in my domain.

your help is appreciated.

thanks!
 
What have you tried so far and where in your code are you stuck ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I'm a sys admin,was looking around for code, I would like to find a script to look for two files with extension "ora" on the local hard disk, if found then copy the two new files from the server to the location of the old files on C drive to overwrite them.

yes I"m stuck!
 
Are you familiar with the FileSystemObject? It provides everything you need in order to complete this task.


-Geates

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer
 
I know the basics, not a programmer. I was looking for a ready to deploy script to do the job, so I can just modify it.
 
sbarwari:

Welcome to tek-tips. This is a great forum. However, it is not a code-writing forum, meaning you cannot post requirements and expect a finished product. You are expected to make an effort, and when you experience a problem, post your question (with code if applicable), and one or more people will assist.

See here for some general etiquette of the site: faq222-2244 (in particular, item #10) and here for some basic guidelines of the site:
 
In addition to what guitarzan said, I would also encourage you to use the forum search link. While you may not find a script that does exactly what you are looking for, you can often find one that is close enough and provides a good starting point. Here's a few I found using the term "recursive file search" that may be of interest to you:
thread329-947098
thread329-1666570
thread329-1660138
thread329-978373
thread329-1611328
thread329-1600250
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top