Rik
Rik

Reputation: 1987

Unable to open file to write using specified name, but not another

I get an error with this code

>> save([params.datapath '/' configfilename{1}],'params')
Error using save
Unable to open file "C:\Users\Rik\Desktop\mps
project\ColdComplaintData/Data/filename-config_30-Jan-2016_20:25:46.mat" for output.

but not this code

>> save([params.datapath '/' 'ddd.mat'],'params')

What is the issue? Thanks.

Upvotes: 0

Views: 132

Answers (1)

K A
K A

Reputation: 197

Windows doesn't allow filenames with colons (:) in them

The following reserved characters:
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

Upvotes: 3

Related Questions