Solved

Automatically Search for Files on my Server

Posted on 2007-12-06
6
200 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:calwood28
Comment Utility
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
Comment Utility
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
Comment Utility
That works great.  Thanks soooo much!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

743 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

16 Experts available now in Live!

Get 1:1 Help Now