Find out if pane is FTP site

I read this great article on using winmerge and DO.
I am using Beyond Compare and created a button to do a file compare:

"E:\Program Files\Beyond Compare 2\BC2.exe" {filepath$} {filepathdest$}

Works great. But, whenever I try to compare from a FTP site BC asks for a username/password. So my thought is to add this to the commandline. But only if it is an FTP site. So I'd like to do something like:

if FTP then:
   if site1 then:
       extra = ftp://username1:password1@
       extra = ftp://username2:password2@
       extra = ""

BC2.exe {extra|filepath$} {extra|filepathdest$}

Could someone lead me?

Presumably the Opus button is using @nolocalizefiles so that the FTP paths are passed to the command? (Normally Opus would download the files to a temp directory and then pass the local temp-file paths to the command.)

If so then the easiest thing to do is to call a script (or whatever) instead of BC.exe and put your logic into the script.

i.e. The script should see if a path started with and if it does insert the username and password for that site into the path before then calling BC.exe

It's like you're my personal assistent:
Direct, to the point, ellaborate answers. _o/\ _