Avatar of samiam41
samiam41
Flag for United States of America asked on

Is it possible to add anchors/links to the html logfile?

Hey super brains!  I've got a batch script that we run on a end user's PC that captures various details about the user/pc/etc.  The results are echo'd out to a logfile that is saved with an html extension.  Because the logfile can be a little lengthy, I was curious if there was a way to include links to "anchors" in the logfile.  Here is a little snippet of the script:



SET mm=%date:~4,2%
SET dd=%date:~7,2% SET yy=%date:~12,2% SET hh=%time:~0,2% SET min=%time:~3,2% SET ss=%time:~6,2% set $sourcepc = %computername% SET logfile="c:\users\%username%\desktop\DIAG_%mm%%dd%%yy%_%hh%%min%%ss%_%computername%.html" echo ===================================== > %logfile% echo [SCRIPT DETAILS] >> %logfile% echo ===================================== >> %logfile% echo ^<pre^> >> %logfile% echo TECH ASSIST RUN LOG >> %logfile% echo Version 1.6 >> %logfile% echo GoLiveDate 10.19.21 >> %logfile% echo +++++++++++++++++++++++++++++++++++++ >> %logfile% echo Script ran at: %time% %date% >> %logfile% echo +++++++++++++++++++++++++++++++++++++ >> %logfile% echo. >> %logfile% echo. >> %logfile%

Open in new window


Windows BatchHTMLScripting LanguagesWindows 10

Avatar of undefined
Last Comment
samiam41

8/22/2022 - Mon
David Favor

Define an exact example of an one of these URLs (<a> tags) you reference.

Keep in mind, with a local log file, any URLs referencing local files... will only work with users who are actually on the local machine or at least the same LAN.
samiam41

ASKER
David, thank you for the question and reply.  I failed in my explanation to accurately explain what I was trying to do.  I'm looking to add anchors to sections within the log file so that at the top of the log file are several "links" to sections within the log file.

User Info  <- link to section in log file that has info related to the user account
Computer Info <- link to section in log file that has info related to computer
Group Policy Info <- link to section in log file that has info related to group policies being applied

This way if we need to jump to the group policy section of the log file, we could click on the Group Policy link at the top of the script and it would jump us to that section.  My apologies for not explaining it very well and I appreciate the question.
SOLUTION
David Favor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
MURUGESAN N

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
samiam41

ASKER
Thanks Experts!!  
Your help has saved me hundreds of hours of internet surfing.
fblack61