• mayurpatel.ce - Wednesday, March 1, 2017 3:22 PM

    SSIS\SSRS\SSAS - Thursday, August 28, 2008 4:34 PM

    ERIN i would recommed you to use variables and expressions to do it.First create 6 variables--1.filename - abc (what ever u want, we will pull the value from ForeachLoop2.SourcePath - give the path name as D:\folder\folder\3.SourceFullfilepath - put this in expression(f4 + evalate as expression and then build the expression with source path + filename+ extension4.ArchivePath- give the path D:\folder\folder\Archive\5.ArchiveFullfilePath- put this one in expression as @[User::ArchivePath] + @[User::FileName] + (DT_STR, 4, 1252)DATEPART("yyyy", GetDate()) + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("mm", GetDate()), 2) + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("dd", GetDate()), 2)+"_" + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("hh", GetDate()), 2) + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("mi", GetDate()), 2) + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("ss", GetDate()), 2) + @[User::FileExtension] 6.FileExtension- extension of ur choiceThen drag Foreachloop container , configure as for eah file found return only file nameThen map the variable file name.Bring the File system task and for destination true as varaiable give the fullarchivepathand source as varaibale fullsourcevariableLet me know if u need more hintsthanks

    Hi ..

    I do have a similar case to develop. But the difference is in source path I do have more than 10 files with different names and same extension. I want to rename file extension only for 5 files  .

    Let say for example:
    Source : ABC.inx , ABD.inx, ABE.inx
    Destination : ABC.dat, ABD.dat, ABE.dat

    What is my difficulty is I can put  only one at a time in filename variable as per your solution .....is there any way to put logic or anything to select multiple files and rename it in once. And selecting 5 require file from 10 files at source..
    Please reply me any suggestion on it 
    Thanks.

    This is a nine year old topic you're replying to. I would suggest starting a topic for your own needs there. Things have moved on quite a bit since 2008.

    In that topic, could you answer why is it a problem renaming each file sequentially in a For Each loop? It's a very quick process, and if you could rename all the files simultaneously, you'd still have contentions on your I/O device.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk