Solved

Automatically Search for Files on my Server

Posted on 2007-12-06
6
201 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
  • 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

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

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SBS 2011 wireless nic? & dynamic VPN. 3 68
Certificate Renewal Question 3 41
Project Operations Manual 2 50
Redirect Website for Mobile Devises 7 40
Read about why website design really matters in today's demanding market.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now