Home Forums Data Warehousing Integration Services compare local folder with archive folder and Move the unmatched files to Different folder RE: compare local folder with archive folder and Move the unmatched files to Different folder

  • muthyala_51 (2/25/2015)


    Hi,

    I have an sftp task to download the files from sftp server to local server, once i download all the files to local folder i want to compare to the files in the "archive" folder which has already processed files from before run. So say Folder "local" has 12 files and folder "Archive" has 8 files, then i need to compare 12 vs 8 and take only those 4 files and move to different directory "Processed folder" in order to do some transformation. Can any one please suggest the best way to perform this.

    File names example: AA_113_FILEName_yymmdd_12323.txt

    AA_113_PICO_150223_12323.txt

    AA_113_PICO_150224_4545435.txt

    You can use a script task to fetch and compare all the files present in both the folders.

    Or use two foreach loops, one inside the other. and move all unmatched files to different folder.

    ____________________________________________________________

    AP