Code:
on *:load:{
  if $script(File.ini) {
    [color:red]Do something[/color]
  }
}


Edit: If you meant you wanted to check the filename of the file which the load event is being triggered in then use this:
Code:
on *:load:{
  if $script == $scriptdirFile.ini {
    [color:red]Do something[/color]
  }
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.