Solved

a function to check file extension

Posted on 2009-04-01
17
742 Views
Last Modified: 2013-11-10
Hi Experts,
some files are placed in a folder everyday..my package need to chek if the files are of .csv and the part of the file name before first " _ " is numeric or not(filename like 999_abcd_200811.csv)and execute the package for all the files if both the conditions are true ,the files not satisfing the conditions to be moved to Archive before the package executed...and could you plese explain me for setting dynamic flat file source connection also ,as the names of the files are different everyday
0
Comment
Question by:ametuer999
  • 8
  • 8
17 Comments
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24044423
I can create an example package for you, but paste here the input and output you want.
Attach an example for input and output.
Regards,
Pedro
www.pedrocgd.blogspot.com
0
 

Author Comment

by:ametuer999
ID: 24044734
Thats great..Thanks in advance...
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24048796
but paste here the input and output you want
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:ametuer999
ID: 24049997
any sample .csv files with the name like 1234_abcd_20090402.csv ,i need the  package to check for the extension and  the filename part before first "_" (1234 in this example)to be numeric..and i am trying to execute a child package for such files...the rest to be archived before the child package starts executing..so i am trying to place an Execute SQL Task before execute package task and using conditional constraints..but i am not sure of the logic..or can i do that using script task also?  if so can you please explain how ...my filename always comes through a global variable named FileName..and i need dynamic flat file source connection to grab all the files from a particular folder...
0
 

Author Comment

by:ametuer999
ID: 24062749
HI
hope i am clear..
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24078621
STILL NEED HELP?
Sorry for the delay...
0
 

Author Comment

by:ametuer999
ID: 24078939
Yes, i still need help...Thank you
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24079228
Ok.. here you have...
Add SSIS Package attached to a SSIS solution
Comment the msgbox I added inside script code.

SSIS-Interface1.JPG
SSIS-Interface2.JPG
SSIS-ScriptCode.JPG
1234-abcd-20090402-csv.txt
xpto-abcd-20090402-csv.txt
Package-EE97-dtsx.txt
0
 
LVL 22

Accepted Solution

by:
PedroCGD earned 500 total points
ID: 24079238
Helped?
Regards,
Pedro
www.pedrocgd.blogspot.com
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24085346
B?!!!!
I made a project example for you... and you give a B? DO you think that I was payed to help you?!
It was the last time, there is no respect for those people that are here helping for free.
0
 

Author Comment

by:ametuer999
ID: 24087718
Sorry about that..i didnt mean it..I am very new to this forum....so..can i change it now?
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24087747
OK... if you are new, no problem. It's not the points but the attitude.
Friends again.
Regards,
Pedro
0
 

Author Comment

by:ametuer999
ID: 24088568
Thank you...could you look into my another open question named 'Refering to parent object' and i will rectify my mistake this time..
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24089426
ametuer999,
Post the question link... I dont find it...
Regards,
Pedro
0
 

Author Comment

by:ametuer999
ID: 24089558
0
 

Author Comment

by:ametuer999
ID: 24099271
Hi PedroCGD,

i just want to change the functionality in parent package .There is a function to call child package in "process Files' task in the parent package...i just want it to be modifiedto call and execute  the migrated child ssis package in the Vb script itself...or ....you could just try to modify 'process Files' task in vb.net ...or... suggest me some other alternative to repreasent the functionality as it is....the rest is o.k. right now...Thanks in advance...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server 2012 - Merge Replication Issue 1 23
Why Delete * statement wont work with sql server ? 6 43
Help Required 3 97
SQL Server 2012 r2 - Varible Table 3 24
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question