Under SQL Server Agent Job, I currently I have a file xxx.js and inside the command window I start with wscript [d:/location-nameoffile].
I tried to run this file also from the DOS prompt and I am getting an error on this line:
var fso = Server.CreateObject("Scripting.FileSystemObject"
;
It tells me that Server is an undefine name.
What should I do and how should I run this code if is done different. I am running SQL Server 7.
This code works fine if I run it from an ASP page.
I believe maybe that I using the wrong command to call this asp page. (WSCRIPT).
It is really a script file but with ASP code in it. I am not too familiar with VBScript I am currently a JavaScript guy.
All your help will be greatly appreciated.
Thanks.
Carlo.
I tried to run this file also from the DOS prompt and I am getting an error on this line:
var fso = Server.CreateObject("Scripting.FileSystemObject"

It tells me that Server is an undefine name.
What should I do and how should I run this code if is done different. I am running SQL Server 7.
This code works fine if I run it from an ASP page.
I believe maybe that I using the wrong command to call this asp page. (WSCRIPT).
It is really a script file but with ASP code in it. I am not too familiar with VBScript I am currently a JavaScript guy.
All your help will be greatly appreciated.
Thanks.
Carlo.