If you want to declare several variables with a comma separated list you need DECLARE only once!
declare @bcpcmd varchar(50),
@query varchar(500),
@filepath varchar(500),
@separator varchar(1)
Or you can write every variable with its own DECLARE on separate lines, but in that case you need no commas between them (it is a syntax error)
declare @bcpcmd varchar(50)
declare @query varchar(500)
declare @filepath varchar(500)
declare @separator varchar(1)
(notice the lack of commas here)