SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Load and rename the files
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vijays3
Constraint Violating Yak Guru

India
343 Posts

Posted - 02/27/2013 :  07:35:10  Show Profile  Reply with Quote
Hi All,

How could i Load the multiple txt files using foreachloop container.
and also I want to renanme file inside the for foreachloop container
after being loaded ..below is my file
mdl_quiz_attempts_11.59.197.4_20130225.txt
to
mdl_quiz_attempts_11.59.197.4_20130225.txt.done ..

Can any one suggest me any idea or link?

Thanks
Vijay Sahu

Vijay is here to learn something from you guys.

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/27/2013 :  23:20:52  Show Profile  Reply with Quote
see logic used here

http://visakhm.blogspot.in/2012/12/selective-file-archiving-using-ssis.html

you just need to change operation inside file system task to rename file and inside append ".move" to loop variable which gets the filename value

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

prett
Posting Yak Master

USA
200 Posts

Posted - 02/27/2013 :  23:21:23  Show Profile  Visit prett's Homepage  Reply with Quote
Check this article: http://www.sqlis.com/sqlis/post/Looping-over-files-with-the-Foreach-Loop.aspx

Hope it will work for you!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000