10-18-2012 11:46 AM
I want to change the format of the data stored in some text files, but I want the file dates to remain the same. Currently, my program creates the files with new dates.
Solved! Go to Solution.
10-18-2012 11:57 AM
You can start here....
10-18-2012 12:02 PM
Can't this be done directly from LabView?
In LabWindows there is a Set File Date and Set File Time function that does this.
10-19-2012 07:44 AM
LabVIEW to my knowledge doesn't have native functions to do this.
You can use .NET functions on Windows to get/set the CreationTime, LastWriteTime and LastAccessTime.
See attached VI (LabVIEW 8.6)
10-19-2012 08:32 AM
Thanks, this helps.
LabVIEW needs a native function. File Information does the Get, but there needfs to be a Set for every Get or what's the point.
05-26-2013 04:03 PM - edited 05-26-2013 04:12 PM
This is awesome, thanks for posting the .NET example, Philip Brooks!
07-24-2017 08:54 PM
Sorry for bringing back old threads. If for some reason you need this function in an application built for a Windows computer without the .NET framework installed, don't want to call an additional executable or just feel like being a sadist by using the dreaded call library function nodes, then the quick and dirty snippet below might help. I also wish LabVIEW had this as a native function.
-Voky
11-10-2017 07:55 AM
Can you attach your Snippet as an actual VI? I was unable to "make it work", and it is a little too small and tiny for me to attempt to recreate it "by hand". I've actually written a routine to reset folder TimeStamps (which, unlike the File TimeStamps, are not "replicated" when you copy a Folder Tree), but I used the .NET commands. I'm always interested in learning "other methods" ...
Bob Schor
11-10-2017 11:00 AM - edited 11-10-2017 11:02 AM
@Voky wrote:
Sorry for bringing back old threads. If for some reason you need this function in an application built for a Windows computer without the .NET framework installed, don't want to call an additional executable or just feel like being a sadist by using the dreaded call library function nodes, then the quick and dirty snippet below might help. I also wish LabVIEW had this as a native function.
-Voky
I think Bob may have been complaining because this forum does nasty formatting things to pictures, ever since the "upgrade", that render the magic in the snippet powerless. (In other words, the meta-data is dumped.) Now you have to upload it as a file in order for it to retain its magical properties.
11-10-2017 11:04 AM
Attached is my VI. I've updated it to support folders, my application only needed file timestamps modified.
-Voky