Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
dpb
Posts:
6,677
Registered:
6/7/07
|
|
Re: replace the first line
Posted:
Mar 21, 2013 8:06 PM
|
|
On 3/21/2013 6:38 PM, Lillian wrote: ...
> I was trying to create 100 files and all but the first Lind are the same. > I already wrote the first file and want to create the other 99 files. > Are there better ways to do this?
Yeah, make one copy of the base file content w/o the first line then create a new file w/ the initial line and use OS COPY command to copy the rest to it from the one source.
Or, if the file isn't terribly large, read it all (again w/o the first line) into memory and then just create each new file, write the specific line and then the remainder.
--
|
|
|
Date
|
Subject
|
Author
|
|
3/21/13
|
|
dpb
|
|
3/21/13
|
|
dpb
|
|
|