Help me in finding new files in folders

  • hello every one

    Help me with this task

    I have 3 Folders

    Folder A,B,C

    Folder A consists of Flat Files in format of

    Kroger_07212010_090855_Sales.TXT

    So what i need is Folder C consists of Flat files with same format like

    Kroger_07212010_090855_Sales.TXT

    So if new file comes tomorrow it will stay in folder A like

    Kroger_07222010_090855_Sales.TXT

    So now what i need to do is i need to compare Folder A and FolderC and if new file found copy that file in to folderB

    So how can i do this.....how can i compare filesnames in different folders....

    Thanks in advance....

  • Use script task, using for each file collection .. you can do this...

    get all files using system.io from folder A

    Take a file into variable

    If not file exists in folder C then

    Move this file to folder B

    else take next file

    loop thru all files..

    do this in for each loop in script task

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

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