Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

file count Expand / Collapse
Author
Message
Posted Tuesday, September 23, 2008 9:42 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued 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..
Post #574557
Posted Tuesday, September 23, 2008 9:51 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 6:36 AM
Points: 228, Visits: 793
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.
Post #574565
Posted Tuesday, September 23, 2008 10:00 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued 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?
Post #574578
Posted Tuesday, September 23, 2008 10:43 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 6:36 AM
Points: 228, Visits: 793
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)


Post #574627
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse