Copy file to a new folder
Mostrar comentarios más antiguos
Under a folder, I have a lot of .mat. "19800101.mat", "19800102.mat", ......."19800201.mat", "19800202.mat", ......"19801201.mat".... I want to copy "19800101.mat", "19800102.mat", and copy others which also belong to January to a new folder, and display this new folder directory. February to a another new folder, and so on. Thanks.
Respuesta aceptada
Más respuestas (2)
Hi Jason
one way to copy files is with command dos
path1='put here full destination path' % for instance D:\Documents\backup\'
dos('copy file_name.mat path1')
If you find this answer of any help solving your question, please click on the thumbs-up vote link,
thanks in advance
John
Prajwol Tamrakar
el 27 de Mayo de 2020
0 votos
This issue of copying file to another directory is possibly due to "ready only access". Use 'f' option to override the read-only status of the destination folder.
copyfile(SourceFile, DestinyFile, 'f')
Categorías
Más información sobre String Parsing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!