Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Insert String
Name: Prince Date: February 18, 2001 at 05:09:09 Pacific
Comment:
Can someone teach me to insert string to every line of a textfile? For example - the textfile goes like this: 1.zip 2.zip 3.zip Then the final product should give: del 1.zip del 2.zip del 3.zip Is that possible? Please Help. Thanks
Name: Laurence Date: February 18, 2001 at 05:24:50 Pacific
Reply:
Study this model. Comment out the DEL statement and examine the temporary batches it produces, then you will have your answer.
:: deltmps.bat @ECHO off SET quote= IF not "%winbootdir%"=="" IF not "%windir%"=="" set quote=" ECHO @PROMPT DEL %quote%>%temp%.\deltmp1.bat DIR/A-D/B/O/S c:\*.tmp >>%temp%.\deltmp1.bat CTTY nul %COMSPEC%/C%temp%.\deltmp1.bat |FIND ":\">%temp%.\deltmp2.bat CTTY con CALL %temp%.\deltmp2.bat DEL %temp%.\deltmp?.bat
0
Response Number 2
Name: Ronin Date: February 18, 2001 at 10:28:56 Pacific
Reply:
What happens if something goes wrong after CTTY nul? bummer :)
Hey!! my keyboard died and there's no display.... OH NO
0
Response Number 3
Name: prince Date: February 18, 2001 at 17:31:29 Pacific
Reply:
Lawrence...this is so complicated. It is that I just cut and paste the whole thing from your reply into a bat file called deltmps.bat and that's all? What should i type if my text file is called 1.txt?
0
Response Number 4
Name: Ronin Date: February 19, 2001 at 10:22:26 Pacific
Summary: 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 inser...
Summary: Hi CoffeeBreak, Sorry! the path inserted within the syntax is to describe generically from where say Strings progey is being loaded from, in my case it is: A:\Strings x=XMSTOTAL not path\Strings x=XM...
Summary: how can i know 1)how many bits are corresponding to length of a non-monospaced characters(let's say "i" and "m") 2)the position of first bit of every line of a character in a nonmonospaced characters...