10-13-2014 11:09 AM
Rolf,
The contents of any folder copied to a new location would still have Old Date under the Date Modified column, but have a New Date (Current System Data) under the Date Created column. PFA snapshot.
Maybe this is the reason Jim wants to change the Modified Dates programmatically.. ?!
10-13-2014 11:35 AM
@parthabe wrote:
Rolf,
The contents of any folder copied to a new location would still have Old Date under the Date Modified column, but have a New Date (Current System Data) under the Date Created column. PFA snapshot.
Maybe this is the reason Jim wants to change the Modified Dates programmatically.. ?!
That's completely different. Those are files, correct? You only get this if you copied it indirectly. Like for instance, retrieving it from your versioning software with the wrong parameters.
10-13-2014 11:45 AM
10-13-2014 02:51 PM
Has anyone tired using Touch through the System Exec.vi?
http://sourceforge.net/projects/touch-win32/files/v1.21/
Description
Windows version of the Linux tools "touch" to change times of files (full program = 5.5KB).
Usage
touch.exe [-hxamcDsvq] [-r ref_file|-t time|-d date_time] -- <file_1> [file_N]
-h : Show this help
-x : Modify creation time
-a : Modify access time
-m : Modify modification time
-c : Do not create file if not found
-r : Use a file or directory as a reference time source
-D : If target doesn't exist, create a directory
-s : Browse sub-directories
-v : Output the result of every file processed
-q : Silent mode, no error is displayed (disable '-v')
-t : Use time [[CC]YY]MMDDhhmm[.SS] instead of today
-d : Use date_time [[YYYY-]MM-DD][Thh:mm[:ss]] instead of today
-- : Finish options, followed by the file list
The options '-r', '-d' and '-t' can not be used simultaneously.
By default, all times will be modified (creation, access and modification).
10-13-2014 04:17 PM
@parthabe wrote:
@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.
That was a good catch. "Timestamp" would have been more appropriate. 🙂
10-13-2014 04:20 PM
@parthabe wrote:
@billko wrote:
Those are files, correct?
Yes, they are.
I was completely wrong about the how the Windows OS handles file copies. It's no wonder you were confused with what I was saying.
10-13-2014 08:29 PM
I have a NAS I've been using for backup, storage, archive, etc. It went "flaky" on me, so I wanted to copy it. When I do so (using Windows or a "file copier" utility) I get the file dates preserved on the new machine, but the folder dates all have the Date of Copying showing when I look at the copy with Windows Explorer.
I'm not trying to subvert anything -- I'd just like to have as close to an "image copy" as possible, preserving file and folder dates. Given the flakiness of the source hardware, I didn't want to do a "real" image copy, and found that the "ordinary copy" (which took 2-3 days, mind you) didn't preserve the folder dates. Hence my desre for a "Set the Folder Date" utility. I've already written the top-level code that walks through the Source device, picking up the folders and dates, and passes the information on to the Target device -- I just can't get the Set Folder Date bit to work (though there are three LabVIEW methods to do so, perhaps only valid in Windows XP ...).
Still exploring, looking for a solution. Given that the folders already exist (and have meaningful names), changing the names to include a Creation Date/Time is a complete non-starter for me!
BS