Link to home
Start Free TrialLog in
Avatar of calwood28
calwood28

asked on

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.  
Avatar of oldPCguy
oldPCguy

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
Avatar of calwood28

ASKER

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?
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\"
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\"
??
ASKER CERTIFIED SOLUTION
Avatar of oldPCguy
oldPCguy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That works great.  Thanks soooo much!