rmpath does not remove folders on path

33 views (last 30 days)
Eric
Eric on 3 Nov 2025 at 18:18
Commented: Matt J on 6 Nov 2025 at 16:42
>> rmpath('/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1/');
Warning: "/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1" not found in path.
> In rmpath>doRemoveFromPath (line 102)
In rmpath (line 59)
>> rmpath('/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1');
Warning: "/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1" not found in path.
> In rmpath>doRemoveFromPath (line 102)
In rmpath (line 59)
>> doc rmpath
>> path
MATLABPATH %%% matlabCP1 manifestly remains on path
/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/turbulence/CP1
/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1/io
/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1/models
/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1/models/skyrmions
/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1/models/velocity

Accepted Answer

Matt J
Matt J on 3 Nov 2025 at 18:42
Edited: Matt J on 3 Nov 2025 at 18:55
No, as you have been warned "/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1" is not on your Matlab path. Several of its subfolders are on your path, but that's not the same.
Perhaps you intended to do,
rmpath ( genpath( "/Users/siggia/Dropbox @RU Dropbox/Eric Siggia/Desktop/claude/matlabCP1") )
  2 Comments
Eric
Eric 19 minutes ago
This solves problem, first generate parent directory and then rmpath will remove it AND all subdirectories
Matt J
Matt J 34 minutes ago
I'm glad, but please Accept-click the answer to indicate that it worked.

Sign in to comment.

More Answers (0)

Categories

Find more on Search Path in Help Center and File Exchange

Tags

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!