Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

FileSystemMap

FileSystemMap[f,root]
gives an association whose keys are the names of files in root, and whose values are the results of applying f to the full names of these files.

FileSystemMap[f,root,n]
gives a nested association in which subdirectories down to level n are represented by an association.

FileSystemMap[f,root,{m,n}]
gives a nested association including files in subdirectories from level m down through n.

FileSystemMap[f,root,lev,r]
combines levels to give a nested output association with r levels.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Apply FileByteCount to all files contained in a directory:

In[1]:=
Click for copyable input
Out[1]=

Apply FileHash to all files through level 2 of the specified directory:

In[1]:=
Click for copyable input
Out[1]=

Apply FileDate to only those files at level 2 of the specified directory:

In[1]:=
Click for copyable input
Out[1]=

Get a flat association for the same directory:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2016
(11.0)