Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have an application that is browser based and updates nightly an index.html page. I have a line of code that I need insterted at the top of the page after it updates. What's the easiest way to insert the code into the file? Edlin? Everything I've looked at is more complicated than I need (very unusual), the file name and directory is static and the string that needs to be inserted is static. Thanks in advance.

This should add the string "New String" to the begin of FILENAME.EXT:
@echo off
echo New String> %temp%.\T1.DAT
copy %temp%.\T1.DAT+FILENAME.EXT > nul
copy %temp%.\T1.DAT FILENAME.EXT > nul
del %temp%.\T1.DATThe problem is that the string must be ECHOable, so it must not contain the characters pipe (|), lower-than and greater-than.
If the line does contain one of those characters, since this file seems to be for personal use only (is it not?), you can put the string on a certain file and use that file on the place I've used %temp%.\T1.DAT on the script above (you would skip lines 2 and 5, of course). I don't think it's a good idea placing this permanent file on the %temp% directory.
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
ho do i
|
Dir listings
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |