Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

pwd

Identify current folder

Syntax

pwd
currentFolder = pwd

Description

pwd displays the MATLAB® current folder.

example

currentFolder = pwd returns the path to the current folder.

Examples

Store Path to MATLAB® Current Folder

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

cd c:\myMATLABFiles
currentFolder = pwd
currentFolder =

    'c:\myMATLABFiles'

Alternative Functionality

View the current folder in the Current Folder toolbar.

Output Arguments

collapse all

MATLAB current folder path, returned as a character vector.

See Also

|

Introduced before R2006a

Was this topic helpful?