Vice Admiral
Vice Admiral
97 views

Please help me in understanding what exactly this *.bat will do....................in copying the log file for the flex connector?

Jump to solution

Hi all,

I have a problem with file reader flex connector(Not created by me).At present it not giving any logs.When i checked the directory log file i saw that logfile does not contains any valid data.There is bat file which is scheduled to run on daily basis.But i was not able to understood how it works.It shows up like this.

# copy /Y D:\test1\test2\ALS*D%date:~12,4%%date:~4,2%%date:~7,2%*

D:\test1\test2\test3\tt_log.log

copy /Y E:\ArcSight\Logs\test_log\*.*

E:\ArcSight\Logs\test_log\ArcLogs\test.%date:~10,4%%date:~4,2%%date:~7,2%.log

Now everyday one logfile test.20110312.log is created in the E:\Arcsight\Logs\test_log\Arclogs.But not contains any valid data.By checking this batch file i was not able to find from where it is copying the logfile contents .The drive D is not present now.I believe it was a maped drive.But now maping is not there.The log file test only contains the same content as in the batch file.Even the maping is there i dont understand how the log file will be copied to test unless the log file is not present in the test_log.

Also the second command it will open tt_log.log r8?

But what confuse me is there are log files in the same directory dated a month back which do contains a valid data and at the end of file the same script in the *.bat file mentioned above.And now only the contents of script file pesent no valid data.

Please help me as i am not that much familair with the *.bat files

Thanks and regards,

Aneesh Salimkumar

Labels (2)
0 Likes
1 Solution

Accepted Solutions
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Hi Aneesh Salimkumar,

   Look like this is a very simple bat file, let me explain line by line:

# copy /Y D:\test1\test2\ALS*D%date:~12,4%%date:~4,2%%date:~7,2%*

- # mean remark, this line will not apply

D:\test1\test2\test3\tt_log.log

- This line no action can apply, you should put a remark in front.

copy /Y E:\ArcSight\Logs\test_log\*.*

E:\ArcSight\Logs\test_log\ArcLogs\test.%date:~10,4%%date:~4,2%%date:~7,2%.log

- copy all file in test_log folder to test_log\ArcLogs\test.<daily>.log, this having some issue:

  1. test_log folder may not has file (or only has one bat file)
  2. if E:\ArcSight\Logs\test_log folder is live log file folder and having application log file, we should put the log file name or extension, eg: abc.log or *.log, but not *.*
  3. If not deletion of log file in test_log folder, the test.<daily>.log size will getting bigger and bigger and when you import to ArcSight ESM using FlexConnector it will have duplicate log every day.

In my opinion, this bat file is for testing purpose only.

View solution in original post

0 Likes
1 Reply
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Hi Aneesh Salimkumar,

   Look like this is a very simple bat file, let me explain line by line:

# copy /Y D:\test1\test2\ALS*D%date:~12,4%%date:~4,2%%date:~7,2%*

- # mean remark, this line will not apply

D:\test1\test2\test3\tt_log.log

- This line no action can apply, you should put a remark in front.

copy /Y E:\ArcSight\Logs\test_log\*.*

E:\ArcSight\Logs\test_log\ArcLogs\test.%date:~10,4%%date:~4,2%%date:~7,2%.log

- copy all file in test_log folder to test_log\ArcLogs\test.<daily>.log, this having some issue:

  1. test_log folder may not has file (or only has one bat file)
  2. if E:\ArcSight\Logs\test_log folder is live log file folder and having application log file, we should put the log file name or extension, eg: abc.log or *.log, but not *.*
  3. If not deletion of log file in test_log folder, the test.<daily>.log size will getting bigger and bigger and when you import to ArcSight ESM using FlexConnector it will have duplicate log every day.

In my opinion, this bat file is for testing purpose only.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.