mIRC Homepage
Posted By: sparta /remove - 14/02/05 01:24 PM
I using this line to remove a log file:

.remove " $+ $logdir $+ $1- $+ .log $+ "

the $1- is grabed out from a @window and it working ok for all channels, but one that is spelled like this.

#_channel.UT_.network.20050210

it shouldent mather how a channel is spelled ? i cant see anything in the channel name that would bring the script to an halt. and it's not used by mirc ether. any ideas? it removes a channel named:

#ut.channel.network.20050210

without any problems, and i using the same code for it.. ? :tongue: the _ in the name shouldent cose any problems? :tongue:
Posted By: Iori Re: /remove - 14/02/05 01:37 PM
Try
.remove $+(",$window($1-).logfile,")
Posted By: sparta Re: /remove - 14/02/05 01:42 PM
$1- grab the right name, tryed to echo it in to my status.. so the name is right.. and it dont say anything like * cant remove bla bla .. it just dont remove the *.log file if the name is like the one i typed in the post abow.. :tongue:
Posted By: DaveC Re: /remove - 14/02/05 08:47 PM
Very odd if the channel was #_channel.UT_.network.20050210 i would see no reason on earth it would erase a file called #ut.channel.network.20050210 the UT and CHANNEL have swapped around? was this a small typo here maybe?, and you ment the _'s just disapeared?


Try taking the . of the front of the remove, so you see what it says when it runs.

Another option is to make the line like this echo -s //remove " $+ $logdir $+ $1- $+ .log $+ " so rather than run it, it displays what it is in the status window, you then see whats goping to be run, if it looks wrong , and have the chance to run it manually and see what happens.

PS: i made both those files and called a remove in an alias using $1 and it removed each of them fine,

Heres a thought, Is the file readonly? Do you have delete rights?
Posted By: sparta Re: /remove - 14/02/05 09:35 PM
It wouldent erase one of the channel name at all..
Posted By: k1tkra04 Re: /remove - 14/02/05 10:51 PM
Could it be that mIRC is seeing "_" as a space at the beginning ?
Posted By: DaveC Re: /remove - 15/02/05 05:08 AM
Quote:
It wouldent erase one of the channel name at all..


Sorry I miss read the bit about it erasing the other channel name, i thought u ment it erased the otherone instead of it frown, no u didnt mean that at all smile

Well did u try the ideas i said, so as to see what actual remove command was issued, and what mircs reply to it was?
Posted By: Iori Re: /remove - 15/02/05 07:39 AM
WTH is the name of this channel that miRC can't handle its name?
Posted By: sparta Re: /remove - 15/02/05 09:43 AM
the orginal name have [ ] instead of the _ mirc adding to the log. dont know if that makes any diffrense..
Posted By: DaveC Re: /remove - 15/02/05 07:48 PM
Quote:
the orginal name have [ ] instead of the _ mirc adding to the log. dont know if that makes any diffrense..


Do you mean the actual log file is #[channel.UT].network.20050210.log and your window has #_channel.UT_.network.20050210.log in it?

If so well its not going to delete that log since its not the same file.

Code:
alias testit {
  echo -s remove " $+ $logdir $+ $$1- $+ .log $+ "
  remove " $+ $logdir $+ $$1- $+ .log $+ "
}


I created both of these two files files #[channel.UT].network.20050210.log & #_channel.UT_.network.20050210.log and ran the above alias.

/testit #[channel.UT].network.20050210
* Removed 'C:\Program Files\Mirc616\logs\#[channel.UT].network.20050210.log'
/testit #_channel.UT_.network.20050210
* Removed 'C:\Program Files\Mirc616\logs\#_channel.UT_.network.20050210.log'

I recreated the file #[channel.UT].network.20050210.log and ran below
/testit #_channel.UT_.network.20050210
* /remove: no such file 'C:\Program Files\Mirc616\logs\#_channel.UT_.Criten.log'


One other thing, you cant delete a log file thats still in use, I dont know if this may have been the cause you recieve a message like
* /remove: unable to remove 'C:\Program Files\Mirc616\logs\#_channel.UT_.network.20050210.log'
Posted By: sparta Re: /remove - 15/02/05 08:35 PM
my bad, it was | and / that got replaced with _ .. but still when mirc rename a file cos of a sign that arent valid in a file or folder name in windows, then it should be able to delete/remove the new file.. and the log wasnt in use, it was 5 days old.. but after a restart of my comp i could erase them.. didnt try to erase anything more tho, dont have any "old" log files that arent in use.. and i need mirc to create it and rename it to see if it happens again..
Posted By: Iori Re: /remove - 15/02/05 10:06 PM
Well, mIRC doesn't usually have problems dealing with such files, $mkfn()/$mknickfn90?$mklogfn() replacee a few chars with _ but they are handled normally.
"but after a restart of my comp i could erase them" Looks like it was somehow locked by some process or another.
© mIRC Discussion Forums