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 02, 2010 1:03 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, April 03, 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 02, 2010 2:51 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 4:39 AM
Points: 1,042, Visits: 1,829
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 02, 2010 3:05 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 12:02 AM
Points: 4,828, Visits: 11,182
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 02, 2010 3:54 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, January 30, 2014 8:52 AM
Points: 1,618, Visits: 20,966
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 02, 2010 4:01 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, March 15, 2014 4:31 AM
Points: 2,808, Visits: 7,173
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 02, 2010 4:02 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 4:39 AM
Points: 1,042, Visits: 1,829
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 02, 2010 4:06 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 4:39 AM
Points: 1,042, Visits: 1,829
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 02, 2010 4:30 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 12:20 AM
Points: 1,026, Visits: 634
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 02, 2010 4:32 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 12:02 AM
Points: 4,828, Visits: 11,182
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 02, 2010 4:38 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 4:39 AM
Points: 1,042, Visits: 1,829
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