Directories and Files Keyword Summary

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Action

Keywords

Change directory or folder.

ChDir

Change the drive.

ChDrive

Copy a file.

FileCopy

Make directory or folder.

MkDir

Remove directory or folder.

RmDir

Rename a file, directory, or folder.

Name

Return current path.

CurDir

Return file date/time stamp.

FileDateTime

Return file, directory, label attributes.

GetAttr

Return file length.

FileLen

Return file name or volume label.

Dir

Set attribute information for a file.

SetAttr

Show: