Yes, that code will work fine.

The difference between the two responses is a subtle one.

Say you wanted to check for a machine that starts "FILE*", you could use
 Code:
If InStr(@WKSTA,"FILE") ...


This will correctly match FILESRV001, FILESRV002 and so on. Unfortunately it will also match "BACKUPFILESERVER" and any other name which has the text FILE in it somewhere.

As you want to do a prefix match we just check that the matched string starts in position 1:
 Code:
If InStr(@WKSTA,"FILE")=1 ...


The results are:
InStr("FILESRV001","FILE") returns 1, so matches
InStr("FILESRV002","FILE") returns 1, so matches
InStr("BACKUPFILESERVER","FILE") returns 7, so does not match