Image Access times difference in Window XP and Vista or 7 OS in MAtlab R(2009a) using [stat,res] = system(E) command
Show older comments
I am using Matlab R(2009a) on window xp,i am trying to access the 'access date and time' of an image through below command: d= dir; i= 3; E= ' '; E=['dir/T:A ',strcat(str,d(i).name)]; [stat,res] = system(E); and upon executing above command in matlab R(2009a) on window XP operating system,i am getting below details:
stat = 0
res =
Volume in drive C is DISK1_VOL1
Volume Serial Number is 0A85-C4A6
Directory of C:\Documents and Settings\Vinod\My Documents\MATLAB\images4comparison
19/02/2011 12:00 AM 6,115 File_F.tif 1 File(s) 6,115 bytes 0 Dir(s) 9,266,167,808 bytes free
and while running aforesaid script in Window 7 or Vista ,i m getting below details:
stat = 0
res =
Volume in drive C is DISK1_VOL1
Volume Serial Number is 0A85-C4A6
Directory of C:\Documents and Settings\Vinod\My Documents\MATLAB\images4comparison
19-Feb-2011 13:45:36 6,115 File_F.tif 1 File(s) 6,115 bytes 0 Dir(s) 9,266,167,808 bytes free
In above comaprison,I would like to bring your attention to the Time only, which shows 12.00 AM on all images under consideration in matlab R(2009a) under window xp operating system, while it shows the proper access time in window vista or window7. So where infact problem lies? CMOS cell in my window XP system is perfect,it shows correct date and time.that time issue i am facing only in matlab which shows different for different operating system. Pls help.
1 Comment
Walter Roberson
on 25 Feb 2011
Display the command before you execute it so that you see the full command. Then use the Windows menu to run CMD (the Windows shell) and type the same command in to there. I _suspect_ you will find that the result is the same as running under Matlab -- that Matlab is just reporting back what it is told by the OS.
Answers (1)
Jan
on 25 Feb 2011
1 vote
You can use this to get the access, creation and modification date of a file: http://www.mathworks.com/matlabcentral/fileexchange/24671-filetime
But I'm sure that your XP has a good reason to think, that the access date 12:00 AM, while Win7 thinks it is 13:45. E.g. the file could have been access between the calls, or the update of the time stamps has been disabled in XP (see regedit -> Key Name: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem -> NtfsDisableLastAccessUpdate).
Categories
Find more on MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!