I'm having a little problem executing a batch file in SQL Server 2008.
I've created a job and I want to zip a file using 7zip and then move that zip to an FTP server. I have a batch file to do this for me, but I want to run it in a job.
So first I create a job and then I create a step. The type of the step goes to Operating System (CmdExec). It runs as the SQL Server Agent Service Account (which is admin, same as my login). And then in the Command box I put my command text.
And it works great, except that nothing happens... So it's going wrong, but it's not giving me an exception.
When I run my batch file directly from explorer everything works fine. If I set up my job to do the following:
cmd.exe /c "MyFile.cmd"
everything goes fine.
Why can't I just put the contents of my file inside the Command box in my step and execute it (after all, that's what it does when I Open a file from that window too)?
Thanks.