Solved

task scheduler to display a log file once a day.

Posted on 2014-03-21
5
636 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
Joe Winograd, EE MVE 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
ID: 39988898
You're welcome. Regards, Joe
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

734 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