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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBscript Search files in directory 1

Status
Not open for further replies.

JordyDB

Programmer
Apr 24, 2012
6
0
0
BE
Can someone help me with writing a script that runs at a specific hour and fills a table or a file with all founded files that match the search criteria.
 
You can use Task Scheduler to run a script at a specified schedule. Regarding the actual script, what have you tried so far and where are you stuck?
 
Nothing I don't know how to start, how can I search a directory and get the list of all founded files?
 
Have a look at FileSystemObject

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
A good place to start is faq329-5515

The sample in the FAQ looks for files with the extension "bak" but we can help you modify it to your needs. When we all know what those are. [smile]
 
Okay thanks, so my needs:

Each night at 3 o'clock the script should run.
When it runs it has to search on a variable (wich comes out of a database) in all the files (content and name) of the C-drive.
The filter should be:
(Sample) OR (SampleID AND Staining) OR (SampleID AND Staining)
All the founded files should be putten in a table (or in case that doesn't work in a text file) with the attributes date modified, date created, Titel, Path, Owner, Type

So that's what the script has to do. Is it possible?
 
Ok these scripts search in the filename but is there a possibility to search in the content?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top