none
from flat file to flat file RRS feed

  • Question

  • I want to transfer data from one source flat file to another flat file and destination file need change the file at run time.

    Technically, it is a backup source file, but I want to rename destination ever time like the following

    Source is MyFile.txt and destination file name will be MyFileNov062013.txt based on current date.

    Your help and information is great appreciated,

    Regards,

    Souris,

    Thursday, November 7, 2013 5:40 AM

Answers

All replies

  • As per my understanding you want to move files from one location to another and at destination location you want file to be saved with different name.

    You can use "File System Task" to achieve this. Set Operation property as "MoveFile".

    The idea is to create variables for Source and Destination path. You can add time stamp or whatever you like when you are creating Destination path.

    In properties window of File System task, you need to select "IsDestinationPathVariable = True" and then provide the name of destination variable.  Similarly, pecify variable for source path.



    Thursday, November 7, 2013 5:54 AM
  • Thanks form the information and help,

    I want to copy to a destination and keep the original.

    does move delete original or keep original?

    actually, it is a copy or backup.

    Thanks again for helping,

    Regards,

    Souris,

    Thursday, November 7, 2013 6:04 AM
  • No worries, "File System Task" has copy file operation as well. You need to set Operation property to Copy file.


    • Edited by Samiullah Niazi Thursday, November 7, 2013 6:22 AM
    • Proposed as answer by Amit C A Thursday, November 7, 2013 11:17 AM
    • Marked as answer by Mike YinModerator Sunday, November 17, 2013 2:13 PM
    Thursday, November 7, 2013 6:10 AM
  • You need file task in control flow to do the same. Below are some tutorial to do the same

    If you have a programming background you can do the same with script task (control flow)

    For programming way you need to append your file name, as per your wish.

    Hope this will help

    • Proposed as answer by Anuj Tripathi Thursday, November 7, 2013 12:20 PM
    • Unproposed as answer by Anuj Tripathi Thursday, November 7, 2013 12:20 PM
    • Marked as answer by Mike YinModerator Sunday, November 17, 2013 2:13 PM
    Thursday, November 7, 2013 10:32 AM