Hi there, please move the semicolon at the end of the statement at the penultimate place.
Like this
SELECT @SQL = N'exec master..xp_cmdShell ''bcp DBA.dbo.x in \\RemoteServer\e$\DIR\Filename.csv -F02 /Sservname\Instancename -T /c /t'';'
Tell us back if that solved teh issue!