Analyze and Modify Nested Directories
Get an association of the FileByteCount for each file in the $InstallationDirectory.
In[1]:=
FileSystemMap[FileByteCount, $InstallationDirectory]
Out[1]=
Get a nested association of FileDate values for all files within the first two levels of a directory.
In[2]:=
FileSystemMap[FileDate,
FileNameJoin[{$InstallationDirectory, "Documentation", "English"}],
2]
Out[2]=
Get the same results, but as a flat association.
In[3]:=
FileSystemMap[FileDate,
FileNameJoin[{$InstallationDirectory, "Documentation",
"English"}], 2, 1]
Out[3]=
Check the modification date for files in $UserBaseDirectory.
In[4]:=
FileSystemMap[FileDate, $UserBaseDirectory, 2]
Out[4]=
Set the FileDate for all files through level 2 of the specified directory.
In[5]:=
FileSystemScan[SetFileDate, $UserBaseDirectory, 2]
All files in $UserBaseDirectory now have the same modification date.
In[6]:=
FileSystemMap[FileDate, $UserBaseDirectory, 2, 1]
Out[6]=