MATLAB: How to copy multiple files to another folder than current folder

copycurrent folder

Hi, I want to move multiple txt files (all starting with rp_aS) to another folder than the current folder of the files (not a subfolder). If I use destdir = [path where I want my files to go]
copyfile rp_aS* destdir
matlab makes a new subfolder called destdir in my current folder. How do I copy all these files to another folder outside of the current folder (i.e., where destdir refers to).
Thanks in advance!

Best Answer

Try using the fullpath to the new folder. On mac it begins something like /Users/blahblahblah....