|
Evangelist Adept
Joined: 10 Oct 2000 Posts: 224 Location: USA
|
Posted: Fri Jul 25, 2003 11:08 pm
Write specific line to file |
Suppose I ahve a file called item.txt, and it has the following
Name: a dagger
Wear: Take hold
Now, could I do the following.
#WRI 6 {this is record 3} 5, and end up with two blank lines after wear: take hold?
Also, is there a way to use a variable to create a new file and write to it?
Basically, I want to id an item, take the name into the ItemName variable, and then create a file named after the item name, replacing all spaces with _, so A Black Dagger would be a_black_dagger.txt?
Can anyone give me any insight to this? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Jul 26, 2003 1:42 am |
For your first question, there's an easy answer. Try it and find out.
For the second, that also sounds pretty easy.
#TR {Name: (*)} {#VAR ItemName {%1};#FILE 7 {%replace( %1, " ", "_").txt}} |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|