LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to change a file's time stamp using LabVIEW?

Hi.

I am trying to use LabVIEW to modifiy the time stamps of files in a Windows NTFS computer.  Does anyone know if this is possible with LabVIEW?

Thanks,

Alejandro
0 Kudos
Message 1 of 5
(3,130 Views)


@AlejandroZ wrote:
Hi.

I am trying to use LabVIEW to modifiy the time stamps of files in a Windows NTFS computer.  Does anyone know if this is possible with LabVIEW?

Thanks,

Alejandro


The latest OpenG file Package has a function "File Info.vi" to do that. You can best get the OpenG oglib_File package by first downloading the OpenG Commander at http://prdownloads.sourceforge.net/ogpm/openg_commander-2.0-alpha3.zip?download or alternatively search the sourceforge site for the OpenG Toolkit project.

Rolf Kalbermatter

Message Edited by rolfk on 02-20-2006 08:48 AM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 5
(3,117 Views)
Hi.

Thanks for your response.  This seems to be exactly what I need, but when I tried using it, it does not seem to be updating the file itself.  I am attaching a VI with the code that I tried, and I would appreciate it if you could take a look at it and give some more guidance.  In this example, I am trying to make the time stamp of a file be one hour earlier than the original.

Also, when I open any of the openG VIs, they open up in a "SubVI waiting to Run" state, and they are not modifiable.  Is this normal?  Is it the method used to prevent modifications to these VIs?

I am using LabVIEW 7.1.

Thanks.

Alejandro
0 Kudos
Message 3 of 5
(3,099 Views)
No they are not protected in any way. You somehow try to open a VI that is part of a running hierarchy. Either you have a VI that uses that function or you are opening the function that is part of the OpenG commander itself through the lvzip library. That function however is an old one that doesn't work for chaning the data/time of a file, is protected through a suffix to be a different name and should never be used in your own applications.

I just tried the function File Info__ogtk.vi that is normally installed into user.lib\_OpenG.lib\file\file.llb\File Info__ogtk.vi and it seemed to work fine for me.

Rolf Kalbermatter

Message Edited by rolfk on 02-20-2006 06:52 PM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 5
(3,078 Views)
Hi.

OK, it did work this time.  I was using the VI from the wrong location. Thank you very much for your help.

Alejandro
0 Kudos
Message 5 of 5
(3,060 Views)