In that case, shouldn't the 'find /i "%usr%"' line for both bes1 and bes2 be the same? Your syntax differs from one to the other (the second appearing to be the correct one). And even then, why not look at automating it with a SQL query against the database to gather the agent number and BES server information (name and agent), a corresponding remote registry lookup for the log file location (unless that's in the database - can't remember), and then load all that information dynamically for the remote search. Now, as to how to do all of that, it shouldn't be hard, but that's not my cup of tea