Showing results for 
Search instead for 
Did you mean: 

Change of File date and time without reading and new save

has anyone adaptet the dll call of 'SetFileTime' or is there another way to manipulate this value with LabVIEW?
Public Declare Function SetFileTime Lib "kernel32" Alias "SetFileTime" (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long
0 Kudos
Message 1 of 10
George Zou
0 Kudos
Message 2 of 10
Hi all,

with a little help from my friends, i find out how to run the SetFileTime and GetFileTime function from the kernel32.dll.
The "G Toolbox" is a commercial product and wasn't a choice also the OpenG Toolkit they change there license away from LGPL.
You can find the VIs one the German LabVIEW Forum: in this post (article no. #13; file: "").
You have to delete or replace the errorfunction because in my firm we use a variant for the error handling.


Oliver Frank
0 Kudos
Message 3 of 10

Hi Oliver. I saw your on the German LV site. I was writing my own but have encountered some errors. Your vi is in 8.0 and I have LV2010-2012 but they are not installed. I use LV6.1 and don't want to install LV2012 because I want to keep my machines "clean" as I will be soon doing an installation test of my own LV app. I wondered if you could send me a couple png's of the BD and of the Call Library Node configuration please. That would help me a lot.

0 Kudos
Message 4 of 10

Oliver has not logged onto the Forum for almost five years.



0 Kudos
Message 5 of 10
You can simply post the 8.0 VI to the down conversion board.
0 Kudos
Message 6 of 10

Thanks guys, I'll try that.

0 Kudos
Message 7 of 10

Here are updated versions in LV6.1. You can set the Creation, Access or Modification Date with a cluster or LV seconds (U32) in UTC or local time.

Download All
0 Kudos
Message 8 of 10

I changed the Generic acces rights from GENERIC_ALL TO GENERIC READ | GENERIC WRITE because I was getting errors over a network. Here are the final versions.

Download All
0 Kudos
Message 9 of 10

@Oliver Frank wrote:

The "G Toolbox" is a commercial product and wasn't a choice also the OpenG Toolkit they change there license away from LGPL.

What could the issue be from changing from LGPL to BSD? If anything BSD is much more permissible. It "only" lacks the requirment to seperate the VIs out of a build executable when you want to distribute said executable. Smiley Very Happy


Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 10