realpath

Version 1.0.0.0 (1.46 KB) by M MA
Absolute pathname.
2.1K Downloads
Updated 10 Oct 2005

View License

Resolves relative paths and extra filesep characters in the input.

Syntax:
OUTPUT = REALPATH(THEPATH)

where THEPATH is the path to a file or folder, which should exist.

Example:
realpath('../myfile.txt');
% returns /home/user/whatever/myfile.txt

Cite As

M MA (2024). realpath (https://www.mathworks.com/matlabcentral/fileexchange/8680-realpath), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on File Name Construction in Help Center and MATLAB Answers
Acknowledgements

Inspired: realpath

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0