Is it possible to create script hooks which are run when entering a given folder?
Show older comments
I want to creat a script in `my_dir/` , say
% hook_me.m
display('foo bar baz');
which should be run whenever I change the MATLAB current folder to `my_dir/`.
Is that possible?
1 Comment
Steven Lord
on 13 Dec 2024
Why? What are you actually planning on having this script do? [I'm guessing the "disp" statement is just a placeholder.]
Depending on the answers to those questions there may be an alternate way to achieve you goal (putting your code in a Project, for example.)
Accepted Answer
More Answers (0)
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!