We help IT Professionals succeed at work.

a function to check file extension

ametuer999
ametuer999 asked
on
838 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
Comment
Watch Question

Commented:
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

Author

Commented:
Thats great..Thanks in advance...

Commented:
but paste here the input and output you want

Author

Commented:
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...

Author

Commented:
HI
hope i am clear..

Commented:
STILL NEED HELP?
Sorry for the delay...

Author

Commented:
Yes, i still need help...Thank you

Commented:
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
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
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.

Author

Commented:
Sorry about that..i didnt mean it..I am very new to this forum....so..can i change it now?

Commented:
OK... if you are new, no problem. It's not the points but the attitude.
Friends again.
Regards,
Pedro

Author

Commented:
Thank you...could you look into my another open question named 'Refering to parent object' and i will rectify my mistake this time..

Commented:
ametuer999,
Post the question link... I dont find it...
Regards,
Pedro

Author

Commented:
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...
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.