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.
Author |
Topic |
warrentyler
Starting Member
6 Posts |
Posted - 2011-07-25 : 14:01:04
|
Hi,I have been using a SQL Server job Step to connect to a regular FTP site. Basically I create a job step with this info:1) Operating system (CmdExec) Step: FTP -s:K:\FTP\ftpauto1.txtWhich: 1) Opens a DOS prompt at c:\documents and settings.... 2) reads FTP from the job step, then -s: (driveletter):\path\script file containing the FTP commands to connect get a files etc.My issue with creating the job step using SQL Server job is:When the DOS prompt opens at: c:\documents and settings....I don't know how to tell it to:CD to D:\ drive, cd to a directory FTP to find the PSFTP.exe and run my script file.I need the SQL job step to do this: C:\, cd d:, d:\ cd ftp,to end here D:\FTP.Anyone know if I can do this in the SQL job step?Thanks,Chris |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-25 : 14:03:52
|
seems like what you need is a batch file which you need to call it from your sql job using xp_cmdshell------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
warrentyler
Starting Member
6 Posts |
Posted - 2011-07-25 : 14:19:57
|
HI,I have created a batch file with the PSFTP commands. I would like a way to call it from a SQL Server job step.Any ideas?Thanks,Chris |
|
|
|
|
|