Consulting

Results 1 to 3 of 3

Thread: File Size comparison by VBA

  1. #1

    File Size comparison by VBA

    Hi
    I am trying to compare same files in two different folder like the files generated today with the previous day file and want to get information
    that how much is difference in size between them.Approximately 22 files are there to compare , and try to get that information in excel.

    thanks

    Regards

    Rahul

  2. #2
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    The FileLen function will let you check the filesize of a given file.

    As for how to compare the sizes of 22 files, there are many ways to do so. A Dir Loop will pull filenames from a given folder, but if there is no relationship between the filenames it will be harder.
    Regards,
    JP

    Read the FAQ
    Getting free help on the web
    My website
    Please use [vba][/vba] tags when posting code

  3. #3
    Hi JP

    The relation between the files of two folder is like they share the same name and difference is they are generated on different days.
    like folder 1 has file name Max1 and folder 2 has file name Max1 too.
    so I need to figure out a way to get a difference of there size and then transfer to the excel like Max1 generated today is greater than yesterday by 25% or less than 10% yesterday


    Thanks

    Regards

    Rahul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •