Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 CMD shell file creation

Author  Topic 

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2008-02-14 : 09:50:07
Hi Guru's

I have a job on hand to create a step for sqlserver job that create a file by using cmd and then write some text init, please suggest how can i do this ?

Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-14 : 09:53:35
exec xp_cdmshell "echo blablabla >myfile.txt"




E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-02-14 : 09:55:54
Create step that is of type "Operating System Command" and enter OS command to redirect whatever you want to write to a file.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2008-02-14 : 10:03:35
Can you please elaborate the steps ... i am preety much new to sql server.. please help


quote:
Originally posted by Peso

exec xp_cdmshell "echo blablabla >myfile.txt"




E 12°55'05.25"
N 56°04'39.16"


Go to Top of Page

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2008-02-14 : 10:31:07
Thanks alot for your help ..


thanks a ton
chander
Go to Top of Page
   

- Advertisement -