rkehn Posted June 18, 2006 Report Share Posted June 18, 2006 I need to change the modified Date and Time of a file. I think that the attached code is going in the right direction. I am trying to do this by making a call to kernal32.dll. The problem I have is formating the data type to pass to the dll for the Date/Time. Any help would be great. Roger Quote Link to comment
Rolf Kalbermatter Posted June 26, 2006 Report Share Posted June 26, 2006 I need to change the modified Date and Time of a file.I think that the attached code is going in the right direction. I am trying to do this by making a call to kernal32.dll. The problem I have is formating the data type to pass to the dll for the Date/Time. Any help would be great. Roger There is a VI File Info.vi in the OpenG Toolkit file package that allows to change the modification date and creation date of a file provided the current user has enough privileges for the file in question. The prototype you are showing in your VI is VisualBasic syntax and not very helpful for LabVIEW purposes. LabVIEW is strictly typed just as C is and needs to be configured to match the expected C types exactly. If I remember right then FILETIME is a 64bit integer or a long long. This can be achieved directly in LabVIEW 8 with the (u)int64 but in LabVIEW before 8.0 you would have to create a cluster of two (u)int32 and pass that instead. Rolf Kalbermatter Quote Link to comment
rkehn Posted June 26, 2006 Author Report Share Posted June 26, 2006 There is a VI File Info.vi in the OpenG Toolkit file package that allows to change the modification date and creation date of a file provided the current user has enough privileges for the file in question.The prototype you are showing in your VI is VisualBasic syntax and not very helpful for LabVIEW purposes. LabVIEW is strictly typed just as C is and needs to be configured to match the expected C types exactly. If I remember right then FILETIME is a 64bit integer or a long long. This can be achieved directly in LabVIEW 8 with the (u)int64 but in LabVIEW before 8.0 you would have to create a cluster of two (u)int32 and pass that instead. Rolf Kalbermatter Thanks I found it in OpenG yesterday, I should have checked sooner. Yes I was just getting to the cluster of two (u)int32 when I found the VI on OpenG. Thanks again to You and Openg... Roger Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.