Directory Tool Icon

Directory Tool

Version:
Current
Last modified: December 02, 2019

The directory tool returns a listing of all the files in a specified directory. Along with file names, other pertinent information about each file is returned, including file size, creation date, last modified, and much more.

Tool Configuration

Configure the Tool

  1. Specify the Directory to return the file contents of. Either type in the location path or use the browse icon to navigate to the intended directory.
  2. File Specification: Specify the type of files to return.
    Wild card use examples:
    • *.*: Return all file types in the specified directory. The default value.
    • *.csv: Return all csv files in the specified directory.
    • temp*.*: Return all files that begin with temp in the file name: temp1.txt and temp_file.yxdb.
  3. Include SubDirectories: Select to search for the specified file types in directories within the specified directory. When this box is left unchecked, only files at the root level of the specified directory are returned.

View the output

The following fields are output from the Directory Tool at runtime:

Name Type Definition
FullPath V_WString The entire path of the file. This includes the drive, directory and file name.
Directory V_WString Specified directory the file resides in.
FileName V_WString The name of the file.
ShortFileName V_WString Old filename convention used by versions of MS Windows prior to Win95 for compatibility with legacy programs.
CreationTime DateTime Date and Time the file was originally created.
LastAccessTime DateTime

Date and Time the file was last read.

This attribute is turned off by default on some operating systems. If you would like to know more about this attribute and enable it on your machine, please reference this article.

LastWriteTime DateTime Date and Time the file was last written or updated.
Size Int64 File size in bytes.
AttributeArchive Bool

The file or directory is an archive file or directory.

Applications use this attribute to mark files for backup or removal.

AttributeCompressed Bool

The file or directory is compressed.

This means that all of the data in the file is compressed.

AttributeEncrypted Bool

The file or directory is encrypted.

This means that all data in the file is encrypted.

AttributeHidden Bool

The file or directory is hidden.

It is not included in an ordinary directory listing.

AttributeNormal Bool The file or directory does not have other attributes set.
AttributeOffline Bool

The file data is not available immediately.

This attribute indicates that the file data is physically moved to offline storage.

This attribute is used by Remote Storage, which is the hierarchical storage management software.

AttributeReadOnly Bool

The file or directory is read-only.

For a file, applications can read the file, but cannot write to it or delete it.

AttributeReparsePoint Bool The file has an associated reparse point.
AttributeSparseFile Bool The file is a sparse file.
AttributeSystem Bool The file or directory is part of the operating system, or the operating system uses the file or directory exclusively.
AttributeTemporary Bool

The file is being used for temporary storage.

File systems attempt to keep all of the data in memory for quick access, rather than flushing it back to mass storage.

You can drag and drop a folder from Windows File Explorer directly onto the canvas to create a Directory.

Was This Helpful?

Need something else? Visit the Alteryx Community or contact support.