I'm trying to something like the following:
Declare @myCommand varchar(255)
Set @myCommand = 'copy F:\Folder\SubFolder\file.txt F:\Folder\SubFolder\my archive\file.txt'
EXEC xp_cmdshell @myCommand
I get an error "The syntax of the command is incorrect."
I believe this is due to the space in "my archive". What am i doing wrong? If it is the space, how do handle the syntax?