473,566 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find File Attributes

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,Hyyyymmd d,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),G etAttr() 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
1 1831

"Roy" <pr********@yah oo.comwrote in message
news:11******** **************@ o61g2000hsh.goo glegroups.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,Hyyyymmd d,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),G etAttr() 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
12229
by: John R. | last post by:
How do you set the following file attributes: Compressed Encrypted Normal ReparsePoint SparsePoint You CAN'T set these using FileInfo.Attributes or File.SetAttributes. It doesn't work for these file attributes.
13
2553
by: Alexandra | last post by:
Hi, I have a hidden system file that I need to read. I am logged in as an administrator. I can not change the file attributes using the windows explorer.
7
13370
by: Mark | last post by:
Hello, I have researched and tried every thing I have found on the web, in groups and MS KB articles. Here is what I have. I have a Windows 2000 Domain Controller all service packs and every thing else from windows update. ..NET 1.0 and 1.1 installed on the server. Actually .NET was installed before the server was made a DC.
18
1657
by: strchild | last post by:
Hey Guys, I've been perusing the newsgroup here for some time now, and going through my ever so non-helpful book, Microsoft Visual Basic .NET Step by Step Version 2003, over and over, and I feel like such a dummy. I read you fella's talking up one side and down the other about streams, and can't for the life of me get a good grasp of them....
3
3295
by: mo | last post by:
I have an application that uses Reporting Services. When the user chooses to print a report, they are taken to a window that allows them to fill in parameters for the report. They then click a button to either export to PDF or to EXCEL. Once the report is generated, the byte array containing the data is put into session and an aspx page is...
16
3505
by: TT (Tom Tempelaere) | last post by:
Hi all, I created an XSD to define the structure of an XML file for my project. I made an XML file linked to the XSD using XmlSpy. The problem is that if I read the file using .NET XmlDocument and then query for the root element, the result is always null (1). However if I strip the root element of all attributes generated by XmlSpy, then...
3
23051
acoder
by: acoder | last post by:
How to Upload a File in Coldfusion Use the cffile tag for uploading files to the server. Note that allowing people to upload files is fraught with danger and only trusted users should be allowed to upload files. Checks should be made to make sure that only allowed file types are uploaded. The Client-Side First of all, let us deal with...
1
2284
by: nitusa | last post by:
Hi All, First time poster, and newbie C# programmer so be patient with my ignorance. :) For my current project I need to store some information (install dir., file names, passwords, ect.) and then have my program access those values. I choose to store the information in an XML file based on a recommendation from a peer. I am also new to...
1
1768
by: Okami | last post by:
Hey guys I'm sure some of you have gotten in this situation before. Unfortunately I do not have the experience in CF to know how to do this myself. Basically I'm updating a clients webpage where the webmaster left (quit? who knows) And it is written in cold fusion. During the file upload the function sticks a few property attributes into a...
1
2810
by: WestyCHC | last post by:
Morning all from a newbie. I have recently written an automation program (my first ever program) for testing and now I am trying to read XML data and assign the values to variables (rather than Excel). Using XPathNavigator I managed to read some of the data, but in order to do this I had to manually remove the attributes from the Parent Nodes....
0
7666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7951
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.