cmd - Matlab, dos() command : files remain "in use" -


after executing simple commands like

dos('copy *.txt new.txt', '-echo') dos('echo. 2 > emptyfile.txt', '-echo') 

i tried delete folder in these files created. however, windows gives me message "cannot delete "foldername": folder being used person/program". have close matlab make work. how solve this? guess it's closing "session" of cmd commands...

what you're not showing change of working directory folder. windows won't let delete folder process has current working directory.

the solution simple: change working directory out of folder. say:

cd('..') 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -