Squashman you are absolutely correct! I tried to “simplify” the problem and wound up making it more difficult to understand what I really needed.
Here is the new code that works even better with foxidrive’s suggestion
Code: Select all
@echo off
echo * * * * this is the original file: * * * *
type server\myssi_subnav.inc
del newfile.inc
for /f "skip=2 tokens=*" %%a in ('find /v "myvideo" "server\myssi_subnav.inc"') Do echo %%a >> newfile.inc
echo * * * * This is the file as created with abc0502's suggestion * * * *
type newfile.inc
find /v "myvideo" < "server\myssi_subnav.inc" > anotherfile.inc
echo * * * * This is the file as created with foxidrive's suggestion * * * *
type anotherfile.inc
echo * * * * I want to thank all who commented here, * * * *
echo * * * * but foxidrive's suggestion looks cleaner in the batch file * * * *
Output
Code: Select all
E:\Documents\BitWare\BitSites\VariableHTML>xx
* * * * this is the original file: * * * *
<div id="subnav">
<ul>
<li><a href=parentchild.htm><span>Parent Child</span></a></li>
<li><a href=grandparent.htm><span>Grandparent</span></a></li>
<li><a href=archive.htm><span>Archive</span></a></li>
<li><a href=commands.htm><span>Commands</span></a></li>
<li><a href=myvideo.htm><span>Commands</span></a></li>
<li><a href=myexample.htm><span>Example</span></a></li>
<li><a href=features.htm><span>Features</span></a></li>
</ul>
</div>
* * * * This is the file as created with abc0502's suggestion * * * *
<div id="subnav">
<ul>
<li><a href=parentchild.htm><span>Parent Child</span></a></li>
<li><a href=grandparent.htm><span>Grandparent</span></a></li>
<li><a href=archive.htm><span>Archive</span></a></li>
<li><a href=commands.htm><span>Commands</span></a></li>
<li><a href=myexample.htm><span>Example</span></a></li>
<li><a href=features.htm><span>Features</span></a></li>
</ul>
</div>
* * * * This is the file as created with foxidrive's suggestion * * * *
<div id="subnav">
<ul>
<li><a href=parentchild.htm><span>Parent Child</span></a></li>
<li><a href=grandparent.htm><span>Grandparent</span></a></li>
<li><a href=archive.htm><span>Archive</span></a></li>
<li><a href=commands.htm><span>Commands</span></a></li>
<li><a href=myexample.htm><span>Example</span></a></li>
<li><a href=features.htm><span>Features</span></a></li>
</ul>
</div>
* * * * I want to thank all who commented here, * * * *
* * * * but foxidrive's suggestion looks cleaner in the batch file * * * *
E:\Documents\BitWare\BitSites\VariableHTML>
If anyone is a website developer, I have some very interesting code that I will share that makes website development a little easier. The MySSI project mentioned in the post is basically a server side emulator.
The question I asked is for "resetting" a page I am creating for a video demo of the process. I need to be able to create the page for the video, then delete everything, all links in the included file, etc., and do it again till I get the video right.