1
我想運行需要使用文件時間戳的R腳本。訪問R中的文件日期
使用Windows資源管理器,我意識到有3種'文件日期類型'(「日期」,「創建日期」和「修改日期」)。見下文。
當使用一個R函數file.info()
你可以閱讀「創建日期」和「修改日期」,而不是「日期」欄(如在Windows資源管理器apperead)此日期欄是一個我需要的。
photo.directory <- file.info(getwd())
head(photo.directory)
size isdir mode mtime ctime
IMG_0381.jpg 15904788 FALSE 666 2017-05-02 13:55:14 2017-05-25 15:39:36
IMG_0382.jpg 8895692 FALSE 666 2017-05-02 13:55:17 2017-05-25 15:39:36
IMG_0383.jpg 8731599 FALSE 666 2017-05-02 13:55:21 2017-05-25 15:39:37
IMG_0384.jpg 15189133 FALSE 666 2017-05-02 13:55:25 2017-05-25 15:39:37
IMG_0385.jpg 10545637 FALSE 666 2017-05-02 13:55:29 2017-05-25 15:39:38
IMG_0386.jpg 10565079 FALSE 666 2017-05-02 13:55:31 2017-05-25 15:39:38
atime exe
IMG_0381.jpg 2017-05-25 15:39:36 no
IMG_0382.jpg 2017-05-25 15:39:36 no
IMG_0383.jpg 2017-05-25 15:39:37 no
IMG_0384.jpg 2017-05-25 15:39:37 no
IMG_0385.jpg 2017-05-25 15:39:38 no
IMG_0386.jpg 2017-05-25 15:39:38 no
任何想法如何克服這在R?
檢查此評論: https://superuser.com/questions/147525/what-is-the-date-column-in-windows-7-explorer-it-matches-no-date-column-from – Jimbou
似乎有兩個軟件包可以訪問EXIF信息:'exif'和'exifr'。你可以試試。 –
我不是你的使用案例,但你可能對搞清楚爲什麼修改日期大於創建日期感興趣 –