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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using File Scripting Object fails with DTSRun Utility

Status
Not open for further replies.

marksg

Programmer
Jun 12, 2000
15
0
0
US
I have written a pkg to read a file from a directory on the DB server. I've created an ActiveX script to use FSO to determine if any files exist in the directory. When running the DTS pkg using the play button, the script will run ok however, when I use the dtsrun utility (within a Job) the pkg fails with "path not found" error. The id the job uses to run the package is an administrator on the DB server machine.
If anyone has any suggestions please let me know.

A portion of the code is attached below;

NOTE:
Code fails on line #3
Value of gvFileLocation is "\\SrvrName\\D$\CMSReporting\Data\AHT_Skilled"

Code:
1. set pkg = DTSGlobalVariables.Parent
2. set fso = CREATEOBJECT("Scripting.FileSystemObject")
3. set fold = fso.GetFolder(DTSGlobalVariables("gvFileLocation").Value)


 
Uses the following to execute from within the job
dtsrun /S SrvrName /N CMS_Load_AHT_Skill /E
 
NOTE value of gvFileLocation is typed incorrectly it really is
Value of gvFileLocation is "\\SrvrName\D$\CMSReporting\Data\AHT_Skilled"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top