From WikiChip
Difference between revisions of "mirc/identifiers/$samepath"
< mirc‎ | identifiers

(Parameters)
m
 
Line 1: Line 1:
{{mirc title|$samepath Identifier}}
+
{{mirc title|$samepath identifier}}'''$samepath''' evaluates whether the pair of [path\]filenames resolve to the same path\filename.
The '''$samepath''' identifier evaluates whether the pair of [path\]filenames resolve to the same path\filename.
 
  
 
== Synopsis ==
 
== Synopsis ==
<pre>$compress( <string1> , <string2> )</pre>
+
<pre>$samepath( <string1> , <string2> )</pre>
  
 
== Parameters ==
 
== Parameters ==
Line 12: Line 11:
  
 
== Example ==
 
== Example ==
 
 
<pre>
 
<pre>
 
//echo -a This returns $true $samepath( $mircexe , $nopath($mircexe) )
 
//echo -a This returns $true $samepath( $mircexe , $nopath($mircexe) )
Line 26: Line 24:
 
== See also ==
 
== See also ==
 
* {{mIRC|$shortfn}}
 
* {{mIRC|$shortfn}}
[[Category:MIRC identifiers]]
+
{{mIRC identifier list}}
 +
[[Category:mIRC identifiers|samepath]]

Latest revision as of 14:02, 22 September 2017

$samepath evaluates whether the pair of [path\]filenames resolve to the same path\filename.

Synopsis[edit]

$samepath( <string1> , <string2> )

Parameters[edit]

  • String1 - first path to be compared
  • String1 - first path to be compared

you can use relative path for both parameters.

Example[edit]

//echo -a This returns $true $samepath( $mircexe , $nopath($mircexe) )
//echo -a This very likely returns $true $samepath( c:\program files\ , c:\progra~1\ )
//echo -a Returns $true if at least 1 subfolder: $samepath( $finddir($mircdir,*,1,1) , $remove($finddir($mircdir,*,1,1),$mircdir) )
//echo -a $true doesn't guarantee filename actually exists: $samepath( $mircdir $+ nosuchfile , nosuchfile )
//var %i delete_me.txt | write %i test | echo -a %i $shortfn(%i) returns $true : $samepath( %i , $shortfn(%i) )

Compatibility[edit]

Added: mIRC v7.46
Added on: 01 Aug 2016
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also[edit]

[Expand]
v · d · e mIRC identifier list