473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 1294
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
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
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
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
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
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
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
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
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
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
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.