Not able to cd into a folder
Mostra commenti meno recenti
I have to make a folder in my project and then cd into it but not able to. The code line looks like this:
name="yash";
mkdir("dB_"+name);
Then I want to cd into that folder but not able to. Please help
Risposta accettata
Più risposte (1)
Maybe check that mkdir successfully creates the directory:
name="yash";
status = mkdir("dB_"+name)
Here status is true, so we know the directory was created.
Then cd into it:
cd("dB_"+name);
cd() % show the current working directory
If mkdir returns false, it means mkdir was not able to create the directory, maybe because you don't have write permissions in the parent directory (i.e., the directory you're in when you call mkdir).
Categorie
Scopri di più su Search Path in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!