Main Content

pwd

Identify current folder

Description

pwd returns the MATLAB® current folder.

example

currentFolder = pwd returns the path to the current folder.

Examples

collapse all

Change the current folder to a local folder and store the path.

cd c:\myMATLABFiles
currentFolder = pwd
currentFolder =

    'c:\myMATLABFiles'

  • View the current folder in the Current Folder toolbar.

Output Arguments

collapse all

MATLAB current folder path, returned as a character vector.

Extended Capabilities

Version History

Introduced before R2006a

See Also

|