Short path name on Windows (COM server)

Get the short path name of files and folders on Windows
Updated 5 Jan 2015

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Return the MS-DOS 8.3 naming convention for files or folders on Windows.

>> fileName = 'C:\Program Files (x86)\Notepad++\notepad++.exe';

>> shortName = fsoGetShortPath(fileName)

shortName =


>> shortName = fsoGetShortName(fileName)

shortName =


This is the same as my other submission named "Short and long path name on Windows" (File ID: #48949) except that it works with a COM server instead of MEX files.

Cite As

Jerome Briot (2024). Short path name on Windows (COM server) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Search Path in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes