PDA

View Full Version : File Size comparison by VBA



rahul_r79
04-13-2011, 02:55 AM
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:banghead:

JP2112
04-13-2011, 07:00 AM
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.

rahul_r79
04-13-2011, 05:00 PM
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