cannot use the master..xp_cmdshell
Posted on 2005-04-04
I am very new in SQL server, and thinking to copy a file from one location to another and also changing the name... please help
declare @FROMPATH as varchar (30)
declare @TOPATH as varchar (30)
declare @FULPATH as varchar (30)
SET @FROMPATH ='Copy "C:\OpenPO.txt"'
SET @TOPATH ='"C:\OpenPO2.txt"'
SET @FULPATH=@FROMPATH + @TOPATH
Exec master..xp_cmdshell @FULPATH
Thanx and this is urgent... it seems not sorking and showing the error message as below,
The filename, directory name, or volume label syntax is incorrect.
Whats wrong with it? please
Thanx in advance