From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically change the modified date of a folder

Solved!
Go to solution

@Bob_Schor wrote:

 

I'm happy to do only a single post, and have it show up on both boards, but have no idea how to do this, hence I post to both places.  When I'm ready to post, maybe you can help me to do it more gracefully ...


Yeah there is no graceful way of doing it.  In my mind there are topics which LAVA is better equiped to discuss, and topics NI's forums are better at.  When I have a question that I want both groups opinions on I will post in both places, then link from one to the other.

0 Kudos
Message 11 of 27
(815 Views)

Bob,

 

Are you using 7Pro?  I'll be interested to hear your solution.  I just started using 7Pro on a new machine, and the security is a PIA!

 

 

Jim

LV 2020
0 Kudos
Message 12 of 27
(791 Views)

Ha!  I was trying to fire up a Windows XP platform so I could test your solution.  I'm working on this, and will certainly share what I know here, once I figure it out.  Feel free to trump my efforts ...

 

BS

0 Kudos
Message 13 of 27
(753 Views)

@lmtis wrote:

 

Is there a way to programmatically change the last modified date of a folder?



Hi All,

 

A question aside - Is this not generally considered as a violation in automated test applications? My intention is to understand the practical use-case of providing this feature in our applications (nothing came up in my mind). Pl enlighten me,

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 14 of 27
(737 Views)

I think it's definitely an edge case and in situations were any form of auditing is required in fact a backdoor to try to fake something the auditing might find important. Even some backup applications usually won't chance at least the last access and often modification time after restore.

Rolf Kalbermatter
My Blog
0 Kudos
Message 15 of 27
(731 Views)

I don't have a network server to send data to.  I copy data from a production test stand using a flash drive.  I then transfer it to my development PC.  File folders now all have todays date.  Much more difficult to evaluate chronologically even though the folder names contain the date.

Jim

LV 2020
0 Kudos
Message 16 of 27
(711 Views)

Name your folders with the appropriate date.  i.e., 2014-10-13 13:04:05 (resolution of the time/date is up to you).

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 17 of 27
(697 Views)

@lmtis wrote:

I don't have a network server to send data to.  I copy data from a production test stand using a flash drive.  I then transfer it to my development PC.  File folders now all have todays date.  Much more difficult to evaluate chronologically even though the folder names contain the date.


 

Jim

LV 2020
0 Kudos
Message 18 of 27
(694 Views)

@lmtis wrote:

@lmtis wrote:

I don't have a network server to send data to.  I copy data from a production test stand using a flash drive.  I then transfer it to my development PC.  File folders now all have todays date.  Much more difficult to evaluate chronologically even though the folder names contain the date.


 


Exactly! And Windows Explorer allows you to sort according to file/directory name too. In fact it's the default sort order for a newly created folder. So rather than trying to outsmart the system with low level calls a much easier solution would be to make sure that the folder naming is formatted in such a way that sorting it by name will give you the sort order you wish.

Bill's suggestion for a formatting will make sure the folders are sorted from oldest to newest thanks to Windows Explorer's smart sort.

Rolf Kalbermatter
My Blog
0 Kudos
Message 19 of 27
(689 Views)

@billko wrote:

Name your folders with the appropriate date.  i.e., 2014-10-13 13:04:05 (resolution of the time/date is up to you).


Since I follow this convention in almost all my ATE LabVIEW Er jobs till now, this corner case (I mean the copying contents to a diff machine/network) necessity never came across my mind.

 

Maybe, Bill, you should have used the word "Timestamp" instead of "Date", so that it would not have appeared to Jim that you had overlooked the last part of his statement. Smiley Happy

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 20 of 27
(676 Views)