Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

Automatically Search for Files on my Server

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
calwood28
Asked:
calwood28
  • 3
  • 3
1 Solution
 
oldPCguyCommented:
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
 
calwood28Author Commented:
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
 
oldPCguyCommented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
calwood28Author Commented:
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
 
oldPCguyCommented:
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
 
calwood28Author Commented:
That works great.  Thanks soooo much!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now