11-15-2013 03:34 PM
I have used the OpenG File Info VI to sucessfully read and write file creation and modification dates, but I can't figure out how to set a folder's modification date.
To set the date to now, it's simply a metter of writing a temp file to the directory in question, and then deleting it. But If I want to recursively copy a directory to a new location AND preserve the creation or modification timestamps, I can't do it.
Is there a solution to this problem?
11-15-2013 04:48 PM
You could use .NET to update the CreationTime
11-15-2013 05:31 PM
Wonderful, much appreciated! I wonder why the Open G version doesn't work. Would be nice to have cross-platform, but this works for me for now!
12-18-2013 09:07 AM
I'm also looking to set/modify Folder Creation dates. How did you place the .NET DirectoryInfo function on your Block Diagram? I can see the .NET palette under Connectivity, but don't know how to get that first Directory Info function you used. [I know I can just copy your code, but I want to learn to "do it myself"]. I'm working with LabVIEW 2012 PDS -- is there a special Toolkit that I need to install to see the Directory Info function?
Thanks for pointing me (and others) in the Right Direction!
Bob Schor
12-18-2013 10:40 AM
To find out how to do it I just looked at the supplied code. The .net constructor points at the DirectoryInfo Object in the mscrolib (4.0.0.0) Assembly. It's fairly easy to figure out by looking at the code.
12-21-2013 02:23 PM
@kbbersch wrote:
To find out how to do it I just looked at the supplied code. The .net constructor points at the DirectoryInfo Object in the mscrolib (4.0.0.0) Assembly. It's fairly easy to figure out by looking at the code.
Well, it might have been easy for you to figure out from the "answer" (the DirectoryInfo node), but it was (sadly) harder for me. However, you did provide a useful hint that leads to the full answer, which I will elaborate here in case any other users who are as clueless as I stumble upon this question.
The following are the steps to get the DirectoryInfo node on your Block Diagram (assuming you don't just Copy and Paste from the supplied example. Note that this is for LabVIEW 2012.
There. Wasn't that easy, not to mention intuitive?
BS