Solved

task scheduler to display a log file once a day.

Posted on 2014-03-21
5
643 Views
Last Modified: 2014-04-09
I want to use task scheduler to display a log file once a day.
how do i set task scheduler to display just today's file.
the folder has a new log file with that days date on it
and keeps the old log files in the folder. The file is backup log file that can be open with notepad.
I ask this question before but the answer does not work for all my pc
I have 300 XP and win 7 that running Power Shell script will just not work.
I think I just need a Dot bat file

old ? link http://rdsrc.us/QiyMoI
0
Comment
Question by:PAP0028
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 13

Accepted Solution

by:
Santosh Gupta earned 250 total points
ID: 39945198
Hi,

Try below code... and run it as bat file.

modify the path and file type.

forfiles /p c:\temp\ /m *.txt /d 0 /c "cmd /c notepad @file"

Open in new window

0
 

Author Comment

by:PAP0028
ID: 39945366
I will need to test this on the weekend i will get back to you on Monday.
0
 
LVL 54

Assisted Solution

by:Joe Winograd, EE MVE 2015&2016
Joe Winograd, EE MVE 2015&2016 earned 250 total points
ID: 39977439
Hi PAP0028,
The FORFILES command posted by Santosh is a native command in W7, but not in XP. For XP, it requires the Resource Kit. So if your XP computers don't have the Resource Kit on them, that code won't work. Here's some alternative code for a .BAT file that will run on any XP (and W7) machine:
echo off
for /f "delims=|" %%i in ('dir "C:\logs\*.txt" /b /o:d') do set LogFile=%%i
notepad %LogFile%

Open in new window

Of course, change "C:\logs\*.txt" to have the correct folder where your Cobian Backup log files are stored. Also, in order for this to work, the .BAT file must reside in the same folder as the Cobian Backup log files. Regards, Joe
0
 

Author Closing Comment

by:PAP0028
ID: 39988764
Thank you.
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39988898
You're welcome. Regards, Joe
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

726 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