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 12»»

Check Files existence in a folder Expand / Collapse
Author
Message
Posted Tuesday, November 2, 2010 1:03 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, April 3, 2013 2:44 PM
Points: 60, Visits: 237
Hi All,

how to implement the below req in SSIS:

how to find out whether any file is present in the specified folder.

Note: we dont know about the file name. Just we need to check whether any files present or not.

Thanks in Advance.
Post #1014303
Posted Tuesday, November 2, 2010 2:51 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
It depends, largely.

Please google WQL


Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #1014328
Posted Tuesday, November 2, 2010 3:05 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:49 AM
Points: 5,035, Visits: 11,771
Depends on what you will do next.

You might just be able to use a Foreach loop and put your 'file(s) found' processing inside it.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1014331
Posted Tuesday, November 2, 2010 3:54 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, August 1, 2014 6:18 AM
Points: 1,618, Visits: 20,980
You may find xp_fileexists extended stored procedure useful. More information on this XP here

Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
Post #1014344
Posted Tuesday, November 2, 2010 4:01 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, May 30, 2014 6:27 PM
Points: 2,808, Visits: 7,175
as another suggestion; the way we do it is to use a script task with the File.Exists Method

http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx
Post #1014346
Posted Tuesday, November 2, 2010 4:02 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
Adiga (11/2/2010)
You may find xp_fileexists extended stored procedure useful. More information on this XP here


The OP says, file name not known


Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #1014349
Posted Tuesday, November 2, 2010 4:06 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
One of the suitable approach would be to watch the said directory using a FileSystemWatcher and fire appropriate events as associated. This seems doable as the system does not deems necessary for a filename to be known.

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #1014351
Posted Tuesday, November 2, 2010 4:30 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 6:46 AM
Points: 1,059, Visits: 697
Hi,

Use Script Task go to design script
U can write C# or VB Script for the same

Cheers!
Sasidhar Pulivarthi
Post #1014356
Posted Tuesday, November 2, 2010 4:32 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:49 AM
Points: 5,035, Visits: 11,771
Pulivarthi Sasidhar (11/2/2010)
Hi,

Use Script Task go to design script
U can write C# or VB Script for the same

Cheers!
Sasidhar Pulivarthi


What does this give the OP that Steveb's post did not?



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1014359
Posted Tuesday, November 2, 2010 4:38 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
Phil Parkin (11/2/2010)
Pulivarthi Sasidhar (11/2/2010)
Hi,

Use Script Task go to design script
U can write C# or VB Script for the same

Cheers!
Sasidhar Pulivarthi


What does this give the OP that Steveb's post did not?


In any case, File.Exists() cannot be used


Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #1014360
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse