Why does using “cd” with “dos” command does not work with switch directories?
The "dos" command does not work as expected for switching directory with "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 "dos" command work with "dir" but not with "cd"?The "dos" command does not work as expected for switching directory with "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 "dos" command work with "dir" but not with "cd"? The "dos" command does not work as expected for switching directory with "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 "dos" command work with "dir" but not with "cd"? doscommand, cdcommand, switchingdirectories MATLAB Answers — New Questions