Why does the "dos" command not work as expected when using "cd" to switch directories?
Afficher commentaires plus anciens
The "dos" command does not work as expected for switching directories with the "cd" command.
>> [status, cmdout] = dos('cd C:\')
cmdout =
0×0 empty char array
However, the "dos" command works for different operations like "dir" fine.
>> [status, cmdout] = dos('dir')
cmdout =
' Volume in drive C is Windows
Volume Serial Number is 6405-C0AD
Directory of C:\Users\..\...\...\...
12/26/2024 04:35 PM <DIR> .
12/30/2024 02:49 PM <DIR> ..
Why does the "dos" command work with "dir" but not with "cd"?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!