A D
asked on
Poweshell Script to schedule
I have a folder named Error Log with thousands of txt files being logged by a third party application. Its difficult to find a specific error from those files and proactively fix related issues timely.
Can you help me with a powershell script which can search specific words from within those files in Error Log folder (e.g. '.' is missing or schema mismatch) and copy only those specific files to other folder named Status Errors?
I can then check Status Errors folder every evening and fix any errors so as to avoid any issues start of next day?
Can you help me with a powershell script which can search specific words from within those files in Error Log folder (e.g. '.' is missing or schema mismatch) and copy only those specific files to other folder named Status Errors?
I can then check Status Errors folder every evening and fix any errors so as to avoid any issues start of next day?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or
https://chocolatey.org/packages/tailblazer
copy *.txt combined.log
and then just inspect combined.log with something like TailBlazerhttps://chocolatey.org/packages/tailblazer
ASKER
ok thanks for your responses.. I'll check this today!
Open in new window
-List is an optimization to only report the first match for each file. I didn' test whether it is optional or mandatory so files are copied only once.