File Exchange

image thumbnail

genpath_safe

version 1.0.2.0 (191 KB) by Daniel J. Auger
Version of "genpath" that ignores Subversion and GitHub config folders.

1 Download

Updated 17 Aug 2015

View Version History

GitHub view license on GitHub

genpath_safe is like the built-in genpath function, but it parses the results and removes directory names that contain some unwanted patterns - "slprj" directories, SVN configuration data and GitHub configuration data.
I have seen many people write functions along these lines in the past - thanks to all for their inspiration!

Cite As

Daniel J. Auger (2020). genpath_safe (https://github.com/daniel-auger/matlab-genpath_safe), GitHub. Retrieved .

Comments and Ratings (3)

dzid_

Awesome that it ignores slurpee. Mathworks should modify genpath to not include slurpee or anything that start with a dot .

Sean

Perfect. I was tired of the Simulink splurge directories getting included.

Charles Harrison

Saw this and it made me chuckle. I also have one of these functions that I call upon frequently. I agree that calling on the native genpath function can sometimes have unintended consequences with an explosion of paths.

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!