Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Agent Working Folder

Status
Not open for further replies.

Crowley16

Technical User
Jan 21, 2004
6,931
GB
Hi Everyone,

I've got a batch file which is being executed by a SQL Server Job.

However the batch file generates some files and other stuff so it means it needs to be executed in the same folder.

Trouble is, the SQL Server Agent executes the batch file in the windows\system32 folder.

Is there a way to set the working folder for a server job?

Thanks

--------------------
Procrastinate Now!
 
the batch file actually fires off various other files in the directory, and the whole thing is supposed to be "installed" to a customer's server so don't know what the final location will be.

Therefore I'm trying to keep a single point of reference.

--------------------
Procrastinate Now!
 
lol, after 1/2 a day of messing about, I've sorted it out...

just put a cd <directory> command at the top of the first batch file...

can't believe it's taken so long to think of something so simple...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top