By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,390 Members | 1,595 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,390 IT Pros & Developers. It's quick & easy.

Find File Attributes

P: n/a
Roy
Hello,
As a part of my application,I need to compare files generated
everyday.I need not need to compare the file contents.I just need to
compare the file size,the line count.The files are named in the
format,Hyyyymmdd,H denoting History.
At present,I use the Dir function to search for the physical existence
of the file and I use the debug.print for functions such as
filelen(path),GetAttr() etc.
My question is how would I put this as a module so that I can use a
date function to compare files generated today with that of yesterday
(mondays files to be compared against fridays).
Also is it possible to output this as a text file?

Thanks,

Roy

Aug 5 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Roy" <pr********@yahoo.comwrote in message
news:11**********************@o61g2000hsh.googlegr oups.com...
Hello,
As a part of my application,I need to compare files generated
everyday.I need not need to compare the file contents.I just need to
compare the file size,the line count.The files are named in the
format,Hyyyymmdd,H denoting History.
At present,I use the Dir function to search for the physical existence
of the file and I use the debug.print for functions such as
filelen(path),GetAttr() etc.
My question is how would I put this as
a module so that I can use a date function
to compare files generated today with that
of yesterday (mondays files to be compared
against fridays).
Let me see: if, as you say earlier, you are using those now, and displaying
the results with Debug.Print, you must have them in a module already. And,
it would appear that you are using Dir to do the search, you already have
the structure set up... decide which day is going to be the "master" and,
when you find the file, try to open the corresponding file for the other day
(that should not interfere with your subsequent use of Dir to find other
files for the "master" day, if there are any).
Also is it possible to output this as a text file?
Surely. Check Help for Open, Print and Print #, and Close. If your
comparison is going to keep history, I suspect you will want to open the
Comparison File for Append. You also will need to decide whether you want
to keep the data in fixed field format (each field starting in a specified
character position) or in delimited form, with each field separated from the
next by your chosen delimiter.

Maybe even easier, keep the information in a Table, and simply Export as
Text, or use the VBA TransferText to export it as a Text File.

Larry Linson
Microsoft Access MVP
Aug 5 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.