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 2008 Forums
 Transact-SQL (2008)
 Running .bat with SQL Job problems

Author  Topic 

BruceT
Yak Posting Veteran

78 Posts

Posted - 2012-11-27 : 08:49:20
Hi,

Has anyone successfully scheduled a .bat file to run as a step within an SQL Server Agent Job? The .bat file runs fine and does what it's supposed to do when run manually, but when run through the Job it states: The system cannot find the file specified.

Thanks

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2012-11-27 : 09:25:45
I'm just guessing here, but did you refer to the file with the full url and not just a letter drive?
instead of C:Folder\file.bat, use \\LocationName\folder\file.bat


Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

BruceT
Yak Posting Veteran

78 Posts

Posted - 2012-11-27 : 09:39:29
quote:
Originally posted by jimf

I'm just guessing here, but did you refer to the file with the full url and not just a letter drive?
instead of C:Folder\file.bat, use \\LocationName\folder\file.bat


Jim

Everyday I learn something that somebody else already knew



Thanks Jim, I'll give that a try!
Go to Top of Page
   

- Advertisement -