mIRC Home    About    Download    Register    News    Help

Print Thread
#139708 17/01/06 10:27 PM
Joined: Jan 2006
Posts: 3
L
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Jan 2006
Posts: 3
I'm trying to delete any line in a text file with certain text, and here's what I have:

write $+(-dw*,mydeleteword,*) mytextfile.txt

The only problem is, whenever a line is found with that phrase, it deletes the entire file! How can I make it only delete the one line.

Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
/write -dw*matchtext* mytextfile.txt

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
first off
write $+( -dw*,mydeleteword,*) mytextfile.txt

the -dw doesn't belong inside the $+()

Joined: Jan 2006
Posts: 3
L
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Jan 2006
Posts: 3
That worked perfectly! But I have another problem!

More than one instance of my search text exsists in the file, how do I delete all of them, not just one.

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
/filter

if your file is named test.txt it would be like this
//filter -ffcx test.txt test.txt *matchtext*

/help /filter

there is a lot of options that you can use


Link Copied to Clipboard