Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
MSBI 6
SSIS 4
BRH 2
#BI 2
#SSRS 1
SSRS 1
whitepapers 1
#SSAS 1
#POWERPIVOT 1
PowerPivot 1

Archive · View All
August 2010 3
April 2010 3

Creating a file using SSIS file system task

Apr 5 2010 7:43PM by Nitesh Rai   

I have seen a lot of queries on forums to create an excel file of a particular format and then use it inside a data flow task. File System Task does come to the mind but unfortunately there is no "Create" operation inside File System Task.  But there is a workaround with little bit of stage setting.  Suppose an excel file is to be created on a daily basis and the name of the file should be the current date (20100110, 20100111 etc.)

First it is required to create a template excel file (same as the file required to be created daily). Then a file system task to copy this template file to the destination folder (folder where the new file is to be created). Then use another file system task to rename the copied file with system date.

  • Step1: Create a template excel file (Sample.xls) in C:\ABC folder
  • Step2: Create 3 variables (string type and package scoped) named :
    • Dest with value as :C:\XYZ (folder where new file is to be created)
    • Final with "Evaluate as Expression" property set as TRUE. then set the expression as: "C:\\XYZ\\" +REPLACE(SUBSTRING( (DT_WSTR,30)GETDATE(),1,10),"-","")+ ".xls"
    • Rename with value as : C:\XYZ\Sample.xls
  • Step3: Take a File System Task and open the File System Task editor.
    • Select Operation as "Copy File"
    • Set IsDestination path variable to TRUE and select Dest from drop down box as variable.
    • Keep IsSourcePath variable as FALSE and create a connecion manager for C:\ABC\Sample.xls
  • Step4: Take one more File System Task and open the File System Task editor.
    • Select Operation as "Rename File"
    • Set IsDestination path variable to TRUE and select Final from drop down box as variable.
    • Keep IsSourcePath variable as TRUE and select Rename from drop down box as variable.

Select the 2nd File System Task, hit F4 (to go to its properties) and set "Delay Validation" as TRUE. The new excel file with current date as its name can be verified in folder C:\XYZ

Tags: MSBI, SSIS, file_system_task,


Nitesh Rai
138 · 1% · 361
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

2  Comments  

  • I could move the file but could not rename the file... error points out to invalid format.. could there be anything that i'm missing ???? response is appreciated.

    commented on Sep 8 2011 9:43AM
    vishalchitrala@gmail.com
    289 · 0% · 148
  • How to i write to

    How do i write to the copied excel file from oledb data source

    commented on Dec 2 2011 3:56AM
    swapnajeet
    3077 · 0% · 2

Your Comment


Sign Up or Login to post a comment.

"Creating a file using SSIS file system task" rated 5 out of 5 by 1 readers
Creating a file using SSIS file system task , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]