copy afh.csv file in matlab

To copy a file in Matlab, you can use the copyfile function. Here's an example of how to use it to copy a CSV file named 'afh.csv' from the current directory to another folder:

main.m
source = 'afh.csv'; % file to be copied
destination = 'C:\MyFolder'; % folder to copy the file to
copyfile(source, destination)
128 chars
4 lines

You can also use command line syntax to copy the file:

main.m
system('copy afh.csv C:\MyFolder')
35 chars
2 lines

Note that in the command line syntax, you need to specify the full path of the destination folder.

gistlibby LogSnag