Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Need to validate file Name,split the file name and store the splited values into Variables

$
0
0

Dear All,

Below is the my requirement.

I have a folder, in that folder I have bunch of text files. The file name is below format

ACA_122_pay_20140430_001

Initially the file name start with ACA code,groupid,group name and date time stamp. This is the standard structure of file name.

I want to check each and every file in the folder with this structure. The structure should be standard for all the files. If the structure same for all files I need to get codes form file name. For example

If you see the below file name, I need to get ACA and put into variable,I need to get 122 and put into variable. For group name and date time needs to put in variable.

If the file format is not valid state then I need to log exception.

Let me know if I am not clear.

Kindly provide the C# code for achieving the above requirement.

As I am new to .net programming. kindly help me.

Thanks in Advance,

Regards,

Madhava Ganji


Madhava Ganji


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>