going through loop in folder
i have one folder,in which i am getting files, i need to go through each and every file ,and that file name i need to give into EDI source. not manually ,how to do it
October 25th, 2012 4:43pm

Not sure entirely what you need, but if I understand you correctly this video should get you on the right track: http://www.youtube.com/watch?feature=player_embedded&v=R6dGKvKFtB0 Edit: Just to clarify, this is a way of avoiding using the loop and just grabbing all the files in a given folder via a flat file source.
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 4:46pm

In SSIS you can use the For Loop Container to acheive your requirement. here is an URL that shows you how . For Each Loop to go over FilesRegards, Dinesh
October 25th, 2012 4:51pm

Yes it is achivable, 1.Use for each loop container 2.use file enumater and get each file name in the variable 3.use Dataflow task inside for each loop container, In source connection pass the file name and do further business logicPlease use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. By ganeshk
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2012 5:28am

Use the Foreach Loop with the file enumerator: http://microsoft-ssis.blogspot.com/2011/02/how-to-configure-foreach-loop-file.html And if you want to process them on arrival then you could use the WMI Task: Details: http://microsoft-ssis.blogspot.com/2010/12/continuously-watching-files-with-wmi.htmlPlease mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
October 26th, 2012 5:32am

Use the Foreach Loop with the file enumerator: http://microsoft-ssis.blogspot.com/2011/02/how-to-configure-foreach-loop-file.html And if you want to process them on arrival then you could use the WMI Task: Details: http://microsoft-ssis.blogspot.com/2010/12/continuously-watching-files-with-wmi.htmlPlease mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2012 5:32am

thanks,but i have 2 question in wmi event task SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile"AND TargetInstance.GroupComponent = "Win32_Directory.Name=\"C:\Users\Rx\Desktop\PDM\FILE"" whats wrong in this query,its showing error and i need to move file once is done i am using file system task,but my question is , do i need to make true is sourcevariable /is destination variable or just source and destination connection
October 26th, 2012 9:53am

url is with quadruple backslash, like in this example (see step 4 of the URL I gave you): SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile" AND TargetInstance.GroupComponent = "Win32_Directory.Name=\"d:\\\\NewFiles\"" And in the File System Task your source is the variable from the Foreach Loop (or the connection manager where you added the expression to overwrite the connectionstring with the variable). Destination is up to you. If you want to rename the archived file then you should check out this post: http://www.rafael-salas.com/2007/03/ssis-file-system-task-move-and-rename.html#!/2007/03/ssis-file-system-task-move-and-rename.html Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2012 10:01am

ok. i got my query , SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile"AND TargetInstance.GroupComponent = "Win32_Directory.Name=\"C:\\\\Users\\\\Rx\\\\Desktop\\\\PDM\\\\FILE\"" please tell me if there is ny error. also in my files system task,if i make issourcepathvariable true i am getting error,and also my package is running ,but i am not getting data into table or able to move file any help
October 26th, 2012 10:12am

also my package image
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2012 10:12am

ok. i got my query , SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile"AND TargetInstance.GroupComponent = "Win32_Directory.Name=\"C:\\\\Users\\\\Rx\\\\Desktop\\\\PDM\\\\FILE\"" please tell me if there is ny error. also in my files system task,if i make issourcepathvariable true i am getting error,and also my package is running ,but i am not getting data into table or able to move file any help I think you only need the 4 backslashes for the first one... what's the error? I think you need to fill in a dummy path in the variable to get the file system task to work. Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
October 26th, 2012 10:31am

also my package image Looks good, now drop a file in the folder you're watchingPlease mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2012 10:32am

i already have 4 files in my folder.but i am not getting any data into table. in my files system i am using variable, that i am storing file name to move to different directory. but ia m getting error
October 27th, 2012 12:32pm

i already have 4 files in my folder.but i am not getting any data into table. in my files system i am using variable, that i am storing file name to move to different directory. but ia m getting error the wmi task will only react on arrivle. And please post the errors (we are not paranormal)Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
Free Windows Admin Tool Kit Click here and download it now
October 27th, 2012 12:55pm

thanks everybody,got solve it
October 29th, 2012 10:17am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics