Link to home
Create AccountLog in
Avatar of samiam41
samiam41Flag 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


Avatar of David Favor
David Favor
Flag of United States of America image

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.
Avatar of 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
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks Experts!!