|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, October 10, 2008 5:34 PM
Points: 54,
Visits: 221
|
|
I need to count no. of files in a directory and if no. of files more than 3 then execute dts package , if not then don't
is this can add in sql agent job?
need your suggestion and solution..
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 10:33 PM
Points: 174,
Visits: 676
|
|
You can do this in a job-
Set first step to type ActiveX Script and create code (using the Scripting.FileSystemObject) throw an error # of files are not there.
Second step will be to run your package...if the first step fails, it won't reach this point.
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, October 10, 2008 5:34 PM
Points: 54,
Visits: 221
|
|
| can you tell how to do activescript?
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 10:33 PM
Points: 174,
Visits: 676
|
|
Activescript is used for Adobe Flash my friend. :)
On the other hand, ActiveX scripting is very a large arena, and not something one can teach you in one forum post. If you cannot find someone who knows VBScript or JScript (types of activex scripts) to help you, you can google the following things:
VBScript and Scripting.FileSystemObject (used for file/directory manipulation) VBScript and Err.Raise (used to raise errors)
|
|
|
|