Search found 15 matches

by Peter123
20 Jan 2015 16:42
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

Hi All,

Thank you very much for your replies and help.

Have a nice day.


- Peter
by Peter123
20 Jan 2015 08:33
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

Hi All, Once again, apologized for the confusion. See my replies below. I think the script should do the checking for the filename based on the above format, but exclude checking for the second which should provide a better result since the file is created at 15 minutes interval Yes, I meant the che...
by Peter123
20 Jan 2015 04:00
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

@foxidrive Thanks for your help. I've tried your script and it's working OK, except the same issue with the other script that I've posted earlier. For example: I've removed 1 file, see below. C:\Temp>del LOG_20150120071501.txt Executed the script and this is the output: C:\Temp>test01.bat missing LO...
by Peter123
20 Jan 2015 01:04
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

Hi Antonio, Thanks for your reply. I've used the updated comment below and put it into the script and it does not produce anything when there is missing file. for /F "tokens=2-4 delims=/ " %%a in ("%date%") do set "YYYYMMDD=%%c%%a%%b" Here is the complete script after u...
by Peter123
20 Jan 2015 00:11
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

Subject: Batch script to detect and check log files @Aacini I've changed the variable and it seems to be working now. Here is the output: LOG_201501010000.txt 1 files missing in files generated so far There are files pending to be generated, or LOG_201501234500.txt is missed However, noticed if the...
by Peter123
19 Jan 2015 23:46
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

@Aacini

Thanks for your reply.

Please see my output below.

C:\Temp>ECHO %DATE%
Tue 01/20/2015



- Peter
by Peter123
19 Jan 2015 21:59
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

@Squashman

Thanks for your reply and advice.

I'll check and monitor further.

Appreciate for your kind help.


- Peter
by Peter123
19 Jan 2015 21:55
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

@Aacini Thank you for your help. I've tried your script and it's not giving the correct output, see below: LOG_2015Tue 2001000000.txt LOG_2015Tue 2001001500.txt LOG_2015Tue 2001003000.txt LOG_2015Tue 2001004500.txt LOG_2015Tue 2001010000.txt LOG_2015Tue 2001011500.txt LOG_2015Tue 2001013000.txt LOG_...
by Peter123
19 Jan 2015 21:45
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

@Squashman

Thank you for your reply.

The files are still being generated and accumulated.

Will it be possible to modify the script to take a different date as an input?

I wanted to use this method to check on files created yesterday as it'll have a more complete listing.

Thank you.


- Peter
by Peter123
19 Jan 2015 21:05
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

@Squashman Thank you very much for your reply. Sorry, think I may have created some confusion here. The sample 5 missing files is only used for illustration purposes. In an actual scenario, the missing file could be more than 5 files and it could also be random. Hard to tell when it will happend, th...
by Peter123
19 Jan 2015 19:55
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

@Squashman Thank you very much for your help on the script. I've tried today and here is the output. 20150120_093557 LOG_20150120011500.txt is missing LOG_20150120013000.txt is missing LOG_20150120014500.txt is missing LOG_20150120020000.txt is missing LOG_20150120021500.txt is missing LOG_201501200...
by Peter123
19 Jan 2015 19:35
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

@Peter123 I have noted two things from your last post 1.Why bother parsing the log file name when you already have the date and time in the dir output. 2.Why are all of your log files being created with names eight hours before their creation time? @Compo Thank you for your reply. 1) Those are addi...
by Peter123
19 Jan 2015 19:33
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

So is your plan to schedule this task to run every hour? If you are then you would need to run before the next hour hits and after the 45 minute log file. So you should schedule it to run every hour starting at say 11:55 pm. That way way you would not have any issues with date and time overlaps. @S...
by Peter123
19 Jan 2015 10:39
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Re: Batch script to detect and check log files

Hi All, Thank you for your kind response and help. Here are some samples of files with the actual date and time format. 19/01/2015 05:00 AM 486,400 LOG_20150118210000.txt 19/01/2015 05:15 AM 4,471,296 LOG_20150118211501.txt 19/01/2015 05:30 AM 3,778,048 LOG_20150118213000.txt 19/01/2015 05:45 AM 4,0...
by Peter123
19 Jan 2015 04:05
Forum: DOS Batch Forum
Topic: Batch script to detect and check log files
Replies: 35
Views: 20850

Batch script to detect and check log files

Hi Gurus, Our system generates some random log files with stamp of date and time every 15 minutes on daily basis as shown on below listing. There are a lot of files generated in a day as the frequency is 15 minutes and it's a headache to check them 1 by 1. LOG_20150118210000.txt LOG_20150118211501.t...