Solved

Automatically Search for Files on my Server

Posted on 2007-12-06
6
205 Views
Last Modified: 2013-12-08
Can somebody help me setup a way to automatically search a specific folder on my server for a .txt file containing "Z-"?  I would like to search for a Z- each evening at a given time.  I am by no means a computer guru.  I was thinking of adding search.exe to my Task Scheduler but that will not execute a specific search in a specific directory.  Any help is greatly  appreciated.  I am running Windows XP Pro on my desktop and Windows SBS 2003 on my server.  
0
Comment
Question by:calwood28
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 4

Expert Comment

by:oldPCguy
ID: 20421419
From a command line ...
To find the text you can use FIND "Z-" c:\<path you want to search in>
To run this search from scheduler you can use cmd.exe /K FIND "Z-" c:\<path you want to search in>
or create a batch file that will do some type of action based on the result
0
 

Author Comment

by:calwood28
ID: 20421778
In the task scheduler I pasted:
C:\WINDOWS\system32\cmd.exe /K FIND "Z-" <B:\MV Machine Files\KOMO FILES>

I also tried:
C:\WINDOWS\system32\cmd.exe /K FIND "Z-" B:\MV Machine Files\KOMO FILES
but the command prompt read:
File not found-B:MV
File not found-MACHINE
File not found-FILES\KOMO
File not found-FILES

I am sure that there is a file in that directory with a Z- in it.  When the task runs I see the command prompt briefly popup and then disappear.  Any suggestions?
0
 
LVL 4

Expert Comment

by:oldPCguy
ID: 20423130
Since you have spaces in the folder names you will need to put quotes around your path name ...
ie: C:\WINDOWS\system32\cmd.exe /K FIND "Z-" "B:\MV Machine Files\KOMO FILES\"
0
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 

Author Comment

by:calwood28
ID: 20423339
I want to make sure I am understanding.  If I paste:
C:\WINDOWS\system32\cmd.exe /K FIND "Z-" "B:\MV Machine Files\KOMO FILES\"
this will look for a Z- in any text files in the directory "B:\MV Machine Files\KOMO FILES\"
??
0
 
LVL 4

Accepted Solution

by:
oldPCguy earned 500 total points
ID: 20423569
You will need to specify what files you want find to look at - *.*
So the actual command is ....
C:\WINDOWS\system32\cmd.exe /K FIND "Z-" "B:\MV Machine Files\KOMO FILES\*.*"

The cmd window will remain open (thats what the /K is for) with a list of the files that contained Z- and whatever the line of text was that had the Z- in it.
0
 

Author Closing Comment

by:calwood28
ID: 31413195
That works great.  Thanks soooo much!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about the ways of improving workplace communication.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to count occurrences of each item in an array.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question