Wolfram言語

システムレベルの機能

ファイルの日付によってファイルのタイムラインを作成する

ディレクトリのファイルと最後の変更日についてのFileSystemMapを作成する.

In[1]:=
Click for copyable input
files = FileSystemMap[FileDate, FileNameJoin[{$HomeDirectory, "Downloads"}]]
In[2]:=
Click for copyable input
<|"2 page flowing Tutorial Template.doc" -> DateObject[{2016, 3, 2}, TimeObject[{9, 53, 1.`}, TimeZone -> -4.`], TimeZone -> -4.`], "2 page step-by-step Tutorial Template.doc" -> DateObject[{2016, 3, 2}, TimeObject[{9, 52, 57.`}, TimeZone -> -4.`], TimeZone -> -4.`], "Files.tar.gz" -> DateObject[{2016, 7, 8}, TimeObject[{12, 36, 45.`}, TimeZone -> -4.`], TimeZone -> -4.`], "desktop.ini" -> DateObject[{2016, 5, 18}, TimeObject[{12, 50, 45.`}, TimeZone -> -4.`], TimeZone -> -4.`], "M-WIN-L-11.0.0-5555928.iso" -> DateObject[{2016, 6, 29}, TimeObject[{13, 2, 9.`}, TimeZone -> -4.`], TimeZone -> -4.`], "SenseHatBlogPost.txt" -> DateObject[{2016, 2, 24}, TimeObject[{12, 29, 50.`}, TimeZone -> -4.`], TimeZone -> -4.`], "ubuntu-15.04-snappy-armhf-raspi2.img" -> DateObject[{2016, 4, 22}, TimeObject[{22, 53, 2.`}, TimeZone -> -4.`], TimeZone -> -4.`], "ubuntu-15.10-desktop-amd64.iso" -> DateObject[{2016, 2, 24}, TimeObject[{2, 6, 29.`}, TimeZone -> -4.`], TimeZone -> -4.`]|>

ディレクトリ内の各ファイルがいつ変更されたかについてのタイムラインを作成する.

In[3]:=
Click for copyable input
TimelinePlot[files]
Out[3]=

2016年6月1日より前に作成されたファイルを取り出し,それらを別のプロットにする.

In[4]:=
Click for copyable input
TimelinePlot[Select[files, (# < DateObject[{2016, 6, 1}]) &]]
Out[4]=

関連する例

de en es fr ko pt-br ru zh