mIRC Home    About    Download    Register    News    Help

Print Thread
#111268 14/02/05 01:24 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#111269 14/02/05 01:37 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Try
.remove $+(",$window($1-).logfile,")

#111270 14/02/05 01:42 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
$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:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#111271 14/02/05 08:47 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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?

#111272 14/02/05 09:35 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
It wouldent erase one of the channel name at all..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#111273 14/02/05 10:51 PM
Joined: Feb 2005
Posts: 34
K
Ameglian cow
Offline
Ameglian cow
K
Joined: Feb 2005
Posts: 34
Could it be that mIRC is seeing "_" as a space at the beginning ?

#111274 15/02/05 05:08 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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?

#111275 15/02/05 07:39 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
WTH is the name of this channel that miRC can't handle its name?

#111276 15/02/05 09:43 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
the orginal name have [ ] instead of the _ mirc adding to the log. dont know if that makes any diffrense..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#111277 15/02/05 07:48 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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'

#111278 15/02/05 08:35 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#111279 15/02/05 10:06 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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.


Link Copied to Clipboard