Users: 30k; Pages Per Session: 2.5p; Avg. Session Duration: 1:35mi
TechDevOps.com
Explore Tools
{Featuring Microsoft Technologies + Enterprise Data + Cloud Computing}



SSIS Create Archive Folder based on current system date & time
by BF (Senior MSSQL Operations - Enterprise, Cloud, Strategy)
2015-10-15







Solution:


Create package variables called ArchivePath and ArchiveFullPath:

ArchivePath will have it's value property set to: \\srv-app01\apps\Input Files Archive\

ArchiveFullPath will have it's properties set to:

EvaluateAsExpression - set this to True

Expression - set this to:
@[User::ArchivePath]+(DT_WSTR,4)YEAR(GETDATE()) + "_"+ RIGHT("0" + (DT_WSTR,2)MONTH(GETDATE()), 2) + "_"+ RIGHT("0" + (DT_WSTR,2)DAY( GETDATE()), 2) + "_"+ RIGHT("0" + (DT_WSTR,2)DATEPART("hh", GETDATE()), 2) + RIGHT("0" + (DT_WSTR,2)DATEPART("mi", GETDATE()), 2)



Configure File System Task to use the ArchiveFullPath package variable

Image #1: