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

Moving CSV Files Based On ColumnNames to Different Folder Destinations

$
0
0

I have One Folder Named ABC in that i have Five Sub Folders (A1 to A5). in that sub folders 10 csv Files with two different Format

Format 1 (Did,Eid,Dname) are the columns 

Format 2 (Dname,Did,Eid,Others) are the columns 

what my requirement is

step 1: loop the files from sub folders  (i completed this)

step 2: check the column names

step 3: move the files into destinations based on formats( csv file have did,eid,dname move the file into Format 1 folder in abcidentity(main folder) else move the file (having dname,did,eid,others) into format 2 folder) this step is also i know how to create by using file system task

what my problem is how to check scan the columns and give the destinations in script task(step 2)

in script task i already wrote if the file is there or not. if file is there content is there or not

i dont know how to scan columns in script task if anybody can send the code. more helpfull for me


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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