How can I use a "... NOT LIKE '%.gif'" (for example) in a batch file calling OSQL? The % is replaced by running the batch, thinking it is a replacable parameter. Trying % on the command line and using %1 in the quoted SQL query doesn't seem to work. It looks like it will but fails. If I double up the % "... NOT LIKE '%%.gif'" it again appears to be correct as one % is dropped but the query still fails.