mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Found this happening in 6.31 and 6.16. A semi-colon is a valid character in a filename, but mIRC handles it strangely within $findfile (and I assume same thing happens in other $identifiers too. To demonstrate the problem:

/write abc.txt test
/write test;.txt test

//echo -a $findfile($mircdir,test;.txt,1)

* /echo: insufficient parameters

//echo -a $findfile($mircdir,test?.txt,1)

C:\mIRC\test;.txt

//echo -a $findfile($mircdir,test*.txt,1)

C:\mIRC\test;.txt

//echo -a $findfile($mircdir,test;*.txt,1)

C:\mIRC\abc.txt

( searching for anything;*.txt returns the alphabetically-first .txt file as if *.txt where used, but using test;?.txt doesn't return anything.)

/set %test test;.txt
/echo -a *** %test ***

*** test;.txt ***

//echo -a $findfile($mircdir,%test,1)

* /echo: insufficient parameters

In all cases, mIRC is behaving the same whether using the string in the //command or putting the string within the %test variable. And, it doesn't help to use $chr(59) instead of the actual semi-colon.

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
From /help $findfile:

Quote:
You can specify multiple wildcards by separating them with semi-colons, eg. *.exe;*.txt;*.hlp.


Therefore it's not a bug, just something you need to work around.

Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
thanks, it didn't dawn on me that's what it was trying to do


Link Copied to Clipboard