Re-name a file using File Sysytem Task

  • Requirement

    My Control Flow has:

    Data Flow task

    FTP Task

    FTP Server: \\server\directory\

    -------------------------

    Data FLow Task contains:

    Source: OLE DB

    Destination: Flat File

    Destination Directory: D:\SSIS\

    File Name: 20090212_test.txt (named dynamically using expressions)

    -------------------------

    This is what I'm trying to do...

    Step 1

    A (.TXT) File is created from Executing a stored procs (OLE DB source).

    Step 2

    (.TXT) created in the Destination Directory: D:\SSIS\20090212_test.txt will be FTP'ed to a server (\\server\directory\)

    Step 3

    On a Success FTP task next step is to to Re-name the file in D:\SSIS\20090212_test.txt TO D:\SSIS\20090212_test.old

    I'm having problem re-naming the file in the source directory using File System Task (How Do I re-name a dynamic file name)

    How do I accomplish this?

    Thanks in advance for any assistance.

    Regards,

    Fenicon

  • If you create variables to hold the source filename and destination filename, this becomes a piece of cake, as all you have to do is set the 'IsSourcePathVariable' and 'IsDestinationPathVariable' properties to True and use the variables as 'SourceVariable' and 'DestinationVariable'.

    You might also be able to code the source and destination directly as Expressions if the '20090212' bit in your example is always 'run date', and the file paths are unchanging.

    Phil

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply