WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Time - Timer and Date Functions
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

FileTimeGet and Writing TimeStamp in File

Keywords:   filetimeget	  time stamp timestamp 

Question:

How do I write the timestamp inside my file?

Answer:

This will do it:
ftime=FileTimeGet ("C:\Windows\win.ini")
handle=fileopen("c:\temp\testfile1.txt", "write")
filewrite(handle, ftime)
fileclose(handle)

run("notepad.exe", "c:\temp\testfile1.txt")
We changed the FileTimeGet function in the 98 version of Winbatch because many users requested that we add in the ability for FileTimeGet to return the file time of a currently open file.
Article ID:   W13864
Filename:   FileTimeGet and TimeStamp in File.txt
File Created: 1999:04:15:16:56:54
Last Updated: 1999:04:15:16:56:54