Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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)
 rename file
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nord
Posting Yak Master

126 Posts

Posted - 12/02/2013 :  15:43:59  Show Profile  Reply with Quote
Hi,
I have ssis transfer files from one dirrectory to another.
I would like to vadd to name file date format yyyymmddhhmmss,how I can do it use ssis
Thanks

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 12/03/2013 :  00:27:59  Show Profile  Reply with Quote
You can use File System Task for this.
Add a variable to generate the filename. Make EvaluateAsExpression property true for it. Keep expression as


REPLACE(REPLACE(REPLACE(SUBSTRING((DT_WSTR,30) (DT_DBTIMESTAMP) GETDATE(),1,19),":","")," ",""),"-","")


then in file system task for rename file choose destination connection as from variable and map it to variable created above.



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

nord
Posting Yak Master

126 Posts

Posted - 12/03/2013 :  11:44:29  Show Profile  Reply with Quote
Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 12/04/2013 :  00:22:20  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next 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.14 seconds. Powered By: Snitz Forums 2000