473,480 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

File Dates

Hi All

I want to read what a partially file date is. So I can log it and look back
in the log and see if the auto update from another device has missed at any
point.

I have used FileSystemWatcher componets to detect the file has changed, I
just want to grab the time and date....is that to much to ask.

Does any one how to do this?

Cheers

Wayne Taylor
www.kryptos.co.uk/blog
Nov 22 '05 #1
2 1296
Hi all

Figured it out, I did the following

Private Sub fsw_All(ByVal sender As Object, ByVal e As FileSystemEventArgs)
Handles fsw.Changed, fsw.Created, fsw.Deleted
Dim changetype As String =
[Enum].GetName(GetType(WatcherChangeTypes), e.ChangeType)
Dim RecordDate As FileInfo = New FileInfo(e.FullPath)

Debug.Write(RecordDate.LastWriteTime())
Debug.Write("file event: " & e.FullPath & " (" & changetype &
")")

End Sub

Cheers

Wayne Taylor

www.kryptos.co.uk/blog

"Wayne Taylor" <wt*@online.parity-ict.com> wrote in message
news:u9**************@TK2MSFTNGP11.phx.gbl...
Hi All

I want to read what a partially file date is. So I can log it and look
back in the log and see if the auto update from another device has missed
at any point.

I have used FileSystemWatcher componets to detect the file has changed, I
just want to grab the time and date....is that to much to ask.

Does any one how to do this?

Cheers

Wayne Taylor
www.kryptos.co.uk/blog

Nov 22 '05 #2
With Deft Fingers, "Wayne Taylor" <wt*@online.parity-ict.com> wrote:
Figured it out, I did the following


Another way is quit simple...

' Check for Updated TimberLine Data File
' and Copy the Most Current Data File
' ======================================
Dim TimberLineFilName, AppFilName As String
TimberLineFilName = mdbDataPath & "TimberlineData.mdb"
AppFilName = appPath & "\TimberlineData.mdb"

If File.Exists(AppFilName) = True Then
Dim fd1 As String = File.GetLastWriteTime(TimberLineFilName)
Dim fd2 As String = File.GetLastWriteTime(AppFilName)
If fd1 <> fd2 Then FileCopy(TimberLineFilName, AppFilName)
Else : FileCopy(TimberLineFilName, AppFilName)
End If

Regards,

Bruce
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
248
by: Marie | last post by:
Hello, Could you help me ?? I have to modify a binary file (containing dates) : I want to access all records ie add,delete,and modify the dates in the binary file. I do not have experience...
1
2326
by: Juan Romero | last post by:
Guys, I am reading file information from disk using the System.IO.File object. This is what the operating system is displaying on Explorer: File Name Modified...
4
1930
by: Dixie | last post by:
I have a spreadsheet that uses VBA code in Access to save itself as a text file. The line is as follows. xl.ActiveSheet.SaveAs CurrentProject.Path & "\Reports\" & DLookup("", "tblButtons",...
5
7132
by: cooch17 | last post by:
There are lots of ways to use javascript to embed the current date/time in a page. But, what I would like to do is the following - have a script pop up a box when the user hovers over a link,...
3
1817
by: Luke | last post by:
I'm pretty stuck at the moment and wondering if anyone can spot the problem. Trying to create a function that will read a text file into a list and return that list. I wrote the following...
5
2322
by: moddster | last post by:
Hi Guys. I am a newbie to perl and need some help with a problem. PROBLEM: I have to parse an HTML file and get rid of all the HTML tags and count the number of sumbissions a person has through...
5
2392
by: pinpe | last post by:
Hi, I have problem of filtering a log file from my perl script. This is the file content of the file pinpe.csv: 2009-06-16 2009-01-29 2009-06-02 2008-03-05
1
3056
by: veer | last post by:
Hi i am making a program in which i want to extract data from html file . Actually there are two dates on html file i want to extract these dates but the main probleum is that these dates are...
2
1700
tdw
by: tdw | last post by:
Hi all, I have several ideas on how to do this, but am having difficulty putting the ideas together and figuring out the most efficient way to do this. I have a database of survey coordinate...
1
1301
by: magicscreen | last post by:
I am trying to create a CSV export file that has a date field. If you look at the table in Access the date looks like mm/dd/yyyy. I want to run the export wizard to create a spec so I can use it...
0
7041
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,...
0
7084
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...
0
6929
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...
1
4779
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...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
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...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
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 ...
0
181
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...

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.