Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Folder Compare

  1. #1
    Join Date
    Oct 2007
    Posts
    15

    Default Folder Compare

    Hi All

    How do you compare / Can I compare the content of two folders? I would like to ensure that all files in one folder is also in the other folder and that the files are exactly the same.

    I have been trying the "File Compare" function and can get it to compare 2 files, if I specify the exact path to the file as well as the filename, but when I use a regex for the filename, I just get an error saying that the file does not exist.

    Thanks,

    Dan

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    That functionality is not yet in, it would probably need to become a new job entry.

    Regards,
    Sven

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Maybe you could do it...
    You can create a transformation that lists the folder entries (filenames) of the 2 folders and compares them with a merge step.
    (new, deleted)

    That way you can say which files are missing or new.

    You can report on the other filenames (in both folders) by sending the filenames to result and doing a loop over it.
    --> Execute once for every result row in a "Job" job entry.

    Then you can define an environment variable FILENAME for each of these and use the "File Compare" job entry to find out if the files are identical or not.

    So, it might be required to thinker a bit, but I think it should be very much possible.

    Matt

  4. #4
    Join Date
    Oct 2007
    Posts
    15

    Thumbs up folder compare

    Hi

    I’m looking at doing the comparison in relation to a FTP download process.

    We have some shaky network conditions between the ETL server and the FTP server, so I basically wanted to make sure the files on the local machine match with the files on the FTP server in every respect and if not, to re-download and overwrite the existing file.

    I will tinker around with your suggestion (at the moment, this is a nice to have). If you are going to include a “folder compare” functionality in a future release, it would nice.

    Thanks,

    Dan

  5. #5
    Join Date
    May 2006
    Posts
    4,882

    Default

    Well... raise a JIRA at http://jira.pentaho.org/browse/PDI ... we sometimes do implement some

    Regards,
    Sven

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.